Can I disable the prompt to save a document

H

H Dodson

I am trying to record a simple macro that will select all, copy and close the
document. I will then paste the clipboard onto another program. The problem
I am having is that prompt that asks me "Do you want to save the changes you
have made..." I never want to save these changes and would like to either be
able to turn the prompt off all the Word docs or put it into the macro not to
ask me. Any suggestions? (I am VB illiterate)
 
J

Jay Freedman

I am trying to record a simple macro that will select all, copy and close the
document. I will then paste the clipboard onto another program. The problem
I am having is that prompt that asks me "Do you want to save the changes you
have made..." I never want to save these changes and would like to either be
able to turn the prompt off all the Word docs or put it into the macro not to
ask me. Any suggestions? (I am VB illiterate)

The Close method takes an optional SaveChanges parameter. This should
close the document without a prompt:

ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
 
H

H Dodson

Thanks for the code it worked great (once I checked out your website to learn
more about how to impliment the code).
 

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