V
Vasily Pavlik
Hi, all.
I created MSWord add-in. It creates a new toolbar with several buttons and
handles events from these buttons.
This add-in based on code from MSDN article.
Everything works fine. Add-in is loaded. Toolbar is being created. Events
from buttons are handled.
But, there is a problem with Normal.dot file. The following actions are
performed:
1. winword.exe started without any document (empty document didplayed).
-> Toolbar appears. Everything's ok.
2. Second instance of winword.exe started from Explorer or any other apps
with .doc file passed as parameter.
-> Toolbar in new window is created. Everything works fine.
3. User tries to close the second window.
-> Messagebox "The file Normal.dot is used by another app or user" appears.
After closing that message box the second window of MSWord is closed
correctly.
All methods of my add-in, such as OnDisconnection() or OnBeginShutdown() are
called AFTER the message box appears.
I'm not sure, but it looks like MSWord desires to store some information
about my toolbar in Normal.dot. Or maybe it wants to store my event handler
data. When I turn off all my DispEventUnadvise() calls, then this error
doesn't appear.
Another problem is in absence of appropiate documentation on this problem. I
didn't find any clear documents to read about MSWord add-ins programming.
All documents contain only base actions, which should be performed to create
and manage toolbars in Word.
Could anyone help me with this problem, please ?
Thanks in advance.
I created MSWord add-in. It creates a new toolbar with several buttons and
handles events from these buttons.
This add-in based on code from MSDN article.
Everything works fine. Add-in is loaded. Toolbar is being created. Events
from buttons are handled.
But, there is a problem with Normal.dot file. The following actions are
performed:
1. winword.exe started without any document (empty document didplayed).
-> Toolbar appears. Everything's ok.
2. Second instance of winword.exe started from Explorer or any other apps
with .doc file passed as parameter.
-> Toolbar in new window is created. Everything works fine.
3. User tries to close the second window.
-> Messagebox "The file Normal.dot is used by another app or user" appears.
After closing that message box the second window of MSWord is closed
correctly.
All methods of my add-in, such as OnDisconnection() or OnBeginShutdown() are
called AFTER the message box appears.
I'm not sure, but it looks like MSWord desires to store some information
about my toolbar in Normal.dot. Or maybe it wants to store my event handler
data. When I turn off all my DispEventUnadvise() calls, then this error
doesn't appear.
Another problem is in absence of appropiate documentation on this problem. I
didn't find any clear documents to read about MSWord add-ins programming.
All documents contain only base actions, which should be performed to create
and manage toolbars in Word.
Could anyone help me with this problem, please ?
Thanks in advance.