Close w/out Save

K

Kreiss

When using the "X" button to close a document is there a
way to close it without saving and not hve the prompt
appear?

Thanks in advace,
Kacy
 
D

DA

Hi Kacy

You can achieve this by setting the "saved" property to
true, and thereby fooling word into thinking that there
have been no changes since the last save.

Follow these steps:
- Open your document, then open the VBA editor.
- Double-click on "ThisDocument" in your project browser
You should see a code window with two drop down lists at
the top of that window.
- Select the left drop-down and choose "Document"
- Choose the "Close" event from the right menu
Now you should see a "Close" sub routine in your code.
- Paste the following command into the routine
ThisDocument.Saved = True
-Save your document.

Hope that helps.
Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top