472,992 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,992 software developers and data experts.

Building an Office COM using VB .NET: Error running with Word

MSFT KB article 302896 includes a step by step example demonstrating how to
build an Office COM in VB .NET,
Yesterday, I implemented the example and it works correctly when starting
each of the following Office 2003 apps from the quick launch bar: Access,
Excel, Outlook, Powerpoint and Word. I used VB.NET 2003.

Today, I tried to open an extant Word document.
I tried two docs, one had already existed, the other was just created anew
on the desktop.

When I double clicked on each document, I got an error message from
Microsoft Office Word. The message was:

"The command cannot be performed because a dialog box is open. Click OK, and
then close open dialog boxes to continue."

This error is being caused by the display of either of two message boxes.
One msgbox is in the OnConnection method, the other is in the
OnStartupComplete method.
If I comment out those two message boxes, the Word error does not occur.

This error occurs ONLY if I open an extant Word document using Windows
Explorer or on the desktop.
Error does not occur if I start Word either from Start | Programs, or from
the icon in the quick launch task bar.

The error does not occur with Access, Excel, or Powerpoint.

I searched MSDN and the KB and could not find the error message.

Any solutions?
--
http://www.standards.com/; See Howard Kaikow's web site.
Nov 20 '05 #1
2 1701
Check in the process your process list if any "winword"
process is left alive after you run your "Office COM". If
so, you need to do an:
YourObject.Quit
-----Original Message-----
MSFT KB article 302896 includes a step by step example demonstrating how tobuild an Office COM in VB .NET,
Yesterday, I implemented the example and it works correctly when startingeach of the following Office 2003 apps from the quick launch bar: Access,Excel, Outlook, Powerpoint and Word. I used VB.NET 2003.

Today, I tried to open an extant Word document.
I tried two docs, one had already existed, the other was just created anewon the desktop.

When I double clicked on each document, I got an error message fromMicrosoft Office Word. The message was:

"The command cannot be performed because a dialog box is open. Click OK, andthen close open dialog boxes to continue."

This error is being caused by the display of either of two message boxes.One msgbox is in the OnConnection method, the other is in theOnStartupComplete method.
If I comment out those two message boxes, the Word error does not occur.
This error occurs ONLY if I open an extant Word document using WindowsExplorer or on the desktop.
Error does not occur if I start Word either from Start | Programs, or fromthe icon in the quick launch task bar.

The error does not occur with Access, Excel, or Powerpoint.
I searched MSDN and the KB and could not find the error message.
Any solutions?
--
http://www.standards.com/; See Howard Kaikow's web site.
.

Nov 20 '05 #2
"Mauricio Arevalo" <an*******@discussions.microsoft.com> wrote in message
news:ae****************************@phx.gbl...
Check in the process your process list if any "winword"
process is left alive after you run your "Office COM". If
so, you need to do an:
YourObject.Quit


I've checked.
There is no winword process left behind.

I have also tested after eliminating the Auto* macros in Word.

It would be useful if somebody could download the KB article and see if they
can reproduce the behavior I see.
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: FinallyInSeattle | last post by:
I have an old product that generates a Word document using Word Automation (tables, pictures, etc). The execution speed is quite slow and I'm finally at the point where I can tell my customers...
4
by: Raju Joseph | last post by:
Hi All, We have a module that needs to automate word 2000 for certain added functionality. I have successfully created the component to do this. Basically I start word using a statement like ...
3
by: thomson | last post by:
Hi All, While Iam building my solution, the VS 2003 editor get stucked, for a few minutes and after sometimes it gets recovered, and the solution building done, While building i looked into the...
3
by: Stu | last post by:
Hi, I am trying to open a word document from an asp.net page but I keep getting an access denied error when I try to create an instance of the word applications. I have created references to...
2
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability,...
6
by: SivaSiva | last post by:
Hi, I'm getting the following error when I try convert a word document using asp.net. Application Event Log : Detection of product '{90110409-6000-11D3-8CFE-0150048383C9}', feature...
1
by: R Reyes | last post by:
ISSUE (reposted) =========================== Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? For many people, they say they add the...
1
by: BK | last post by:
I have a .NET Solution (currently in 2003, FW 1.1) that uses Office automation for a few things (generates a Word document, dumps datagrids to Excel, etc.). One of my programmers works on the...
2
yayh
by: yayh | last post by:
Dear all i tried this fine artical which guide you to write php code to create ms office file using COM. http://web.informbank.com/articles/technology/php-office-documents.htm the problem...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.