|
-
Sep 10th, 2000, 01:23 AM
#1
Thread Starter
Lively Member
I want to close a word doc or exit word in the normal way
and NOT receive the 'do you want to save' prompt
I know about 'wdDoNotSaveChanges', which I would like to
use, but it won't work in 'Document.Close' or
'AutoClose'
This will work from a command button, but I want it to
work from 'X' or 'File' - 'Close'
Thanks in advance
-
Sep 10th, 2000, 04:01 AM
#2
Lively Member
what about trying application.quit.
Not so sure what you trying to do but what about just savinbg the doc just before you close it. do the save and then closew word.
also sometimes using sendkeys altf F$ = %{F4} is more stable
You are living a pacifist dream, and if you dreaming it means you sleeping and you should damn well wake up!
-
Sep 10th, 2000, 07:18 AM
#3
_______
if it works from a command button then just use the code from the button in the Querry Unload and Unload events of the form.
The application quit using unsave should work. Try creating a macro to do what you want and then copy the macro code.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 10th, 2000, 07:34 AM
#4
From Word start up the Visual Basic Editor and in the project window choose "This Document" and add the following code to the Close event:
Code:
Private Sub Document_Close()
ActiveWindow.Close wdDoNotSaveChanges
End Sub
Good luck!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|