Exit without Saving

  • Thread starter Thread starter D
  • Start date Start date
D

D

I've got a Document Management system put together with an
Access DB and Using Word I'm really close to wrapping it
up but need to close the document w/o saving when
Reviewing is done. A form is launched and I'm using the
Documents Custom Properties to store info and if a
document is reviewed then none of the info needs to be
saved. Any help would be great.

This what I've tried to use so far

activedocument.close 0
Application.Options.SavePropertiesPrompt = False
ActiveDocument.ActiveWindow.Close 0
savechanges:=wddonotsavechanges
 
Hi D,

The first one in your list

ActiveDocument.Close 0

should have done the trick. Formally it should be

ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges

but the SaveChanges parameter is the first one in the Close method's list,
and the value of the wdDoNotSaveChanges constant is 0, so the two statements
are equivalent.

If that still doesn't work for you, you can do it in two steps by lying to
Word and saying that the document hasn't been changed since the last time it
was saved, so Word won't ask to save again:

ActiveDocument.Saved = True
ActiveDocument.Close
 
Jay thanks that worked out great

D
-----Original Message-----
Hi D,

The first one in your list

ActiveDocument.Close 0

should have done the trick. Formally it should be

ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges

but the SaveChanges parameter is the first one in the Close method's list,
and the value of the wdDoNotSaveChanges constant is 0, so the two statements
are equivalent.

If that still doesn't work for you, you can do it in two steps by lying to
Word and saying that the document hasn't been changed since the last time it
was saved, so Word won't ask to save again:

ActiveDocument.Saved = True
ActiveDocument.Close

--
Regards,
Jay Freedman
Microsoft Word MVP



.
 

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

Back
Top