473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 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 1716
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.