PDA

View Full Version : Saving with no prompt



cc_brewster
01-28-2011, 10:13 AM
I need to close the active document without being prompted about tracked changes. The documents do have tracked changes, and I want them saved as is. A posting I found said that this should work:

ActiveDocument.Close SaveChanges:=wdSaveChanges
But it does not work, possibly because I'm on W07, and the posting was older. Is there a way to do this?

A side question is why Documents.Save has the NoPrompt keyword, but ActiveDocument.Save does not.

fumei
01-28-2011, 12:42 PM
Notice the plural in Documents.Save

This does NOT save the current Active Document, except insofar as it is one item in the Documents - again notice the plural - collection.

Documents.Save is an instruction to save ALL of the documents in the collection. And yes, it has NoPrompt. ActiveDocument is singular, and does not.

cc_brewster
01-28-2011, 02:10 PM
I understand the difference between Documents.Save and ActiveDocument.Save. This was not my question. I was just pointing out that one Save has an option that the other lacks, and I need that option. Can you suggest a way to deactivate the prompt that appears on ActiveDocument.Save?