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.wdPromptToSaveChan ges,
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 4 3515
Hi Raju,
Can you pls post the code ?
I will try & simulate this thing & see where the problem is occurring &
why ?
Kalpesh
You are prompting to save changes when you quit - of course it is going to
give you these message boxes.
"Raju Joseph" <vz******@msn.com> wrote in message
news:er**************@tk2msftngp13.phx.gbl... 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.wdPromptToSaveChan ges, 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
All you need to do is set the Word option controlling this behavior using
the Options property of the Word application class instance.
Options.SaveNormalPrompt = False
I don't know if this option is available in Word 2000, but it should be. You
could also open an instance of Word and set this property manually before
running your program.
"Raju Joseph" <vz******@msn.com> wrote in message
news:er**************@tk2msftngp13.phx.gbl... 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.wdPromptToSaveChan ges, 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
Okay,
I found the problem and fixed it.
Reason why Word was prompting me to save Normal.dot file because I modified
the default behavior of certain Word menus and toolbar buttons.
All I had to do was before closing the word application was to place the
following code
Application.NomalTemplate.Saved = True
everything seems to be okay.
Thanks a lot guys,
"Peter Bernhardt" <pe***@nospam.com> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl... All you need to do is set the Word option controlling this behavior using the Options property of the Word application class instance.
Options.SaveNormalPrompt = False
I don't know if this option is available in Word 2000, but it should be. You could also open an instance of Word and set this property manually before running your program.
"Raju Joseph" <vz******@msn.com> wrote in message news:er**************@tk2msftngp13.phx.gbl... 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.wdPromptToSaveChan ges, 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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: jabailo |
last post by:
I came across this article while researching a VB6 430 error:
INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757
...
|
by: |
last post by:
Hi All,
I'm tring to write an application which open .xls files and get information
from them ( using .xls file as a database ).
According to the MSDN (...
|
by: |
last post by:
Hi All,
I'm tring to write an application which open .xls files and get information
from them ( using .xls file as a database ).
According to the MSDN (...
|
by: jabailo |
last post by:
I came across this article while researching a VB6 430 error:
INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757
...
|
by: jabailo |
last post by:
I came across this article while researching a VB6 430 error:
INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |