469,917 Members | 1,683 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

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 1591
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by FinallyInSeattle | last post: by
4 posts views Thread by Raju Joseph | last post: by
3 posts views Thread by thomson | last post: by
1 post views Thread by BK | last post: by
yayh
2 posts views Thread by yayh | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.