Aquarus
asked on
Word document and its Open/Closed status controlled via VB6
This is the code lines that work to open the word document.
Set objWordApp = CreateObject("Word.Applica tion")
Set objWordDoc = CreateObject("Word.Documen t")
Set objWordDoc = objWordApp.Documents.Open( strMailMer geFilePath )
objWordApp.Visible = True
After this lines I have the document opened and user can view it. I would like to application to do some other stuff when user clicked the word document "closed' - that x - button in the right upper corner.
Is this possible to do? Can the application see the status of the objWordDoc?
I
Set objWordApp = CreateObject("Word.Applica
Set objWordDoc = CreateObject("Word.Documen
Set objWordDoc = objWordApp.Documents.Open(
objWordApp.Visible = True
After this lines I have the document opened and user can view it. I would like to application to do some other stuff when user clicked the word document "closed' - that x - button in the right upper corner.
Is this possible to do? Can the application see the status of the objWordDoc?
I
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you ,
I am almost done here.
Can I programmatically set up the property of the word document so when the user closes it the word application does warn: Save or No or Cancel?
I am almost done here.
Can I programmatically set up the property of the word document so when the user closes it the word application does warn: Save or No or Cancel?
In your code trap errors. That should let you know if the user manually closes the word document.
Sid