R
Raju Joseph
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
_word = New Word.Application
Then I proceed to sink the word events that I need.
Once everything is completed, I unsink the events and quit word using the
statement
_word.Quit( SaveChanges:=Word.WdSaveOptions.wdPromptToSaveChanges,
Missing.Value, Missing.Value)
Everything works fine except for a recent problem we discovered. If the user
has already an instance of word running, then when the code tries to quit
the automated word application, I get the following message
This file is in use by another application or user. (C:\Documents and
Settings\...\Normal.dot")
When I click Ok, it displays the SaveAs dialog. I cancel this dialog. Then
when I attempt to close the automated word application manually, I get the
following error message
Changes have been made that affect the global template, Normal.dot. Do you
want to save changes?
Could some one point me in the right direction to avoid these messages from
popping up. Is there any way I can turn off these messages or somehow
indicate that the global template Normal.dot has not been modified.
I am using Visual Studio .NET 2003 and Word 2000. In the automated word
application I am modifying the ways in which certain menus and toolbar
buttons of word should behave.
Thanks,
Raju
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
_word = New Word.Application
Then I proceed to sink the word events that I need.
Once everything is completed, I unsink the events and quit word using the
statement
_word.Quit( SaveChanges:=Word.WdSaveOptions.wdPromptToSaveChanges,
Missing.Value, Missing.Value)
Everything works fine except for a recent problem we discovered. If the user
has already an instance of word running, then when the code tries to quit
the automated word application, I get the following message
This file is in use by another application or user. (C:\Documents and
Settings\...\Normal.dot")
When I click Ok, it displays the SaveAs dialog. I cancel this dialog. Then
when I attempt to close the automated word application manually, I get the
following error message
Changes have been made that affect the global template, Normal.dot. Do you
want to save changes?
Could some one point me in the right direction to avoid these messages from
popping up. Is there any way I can turn off these messages or somehow
indicate that the global template Normal.dot has not been modified.
I am using Visual Studio .NET 2003 and Word 2000. In the automated word
application I am modifying the ways in which certain menus and toolbar
buttons of word should behave.
Thanks,
Raju