Can't Close Word Instance without Save Changes Dlg Box

P

PoulsenL

I am using COM to manipulate word attachments to emails. Once I use them I
am not concerned with saving the results. I use the following line:

myWord.ActiveDocument.Close(wc.wdDoNotSaveChanges)

This closes the document fine but only after I click no on the resulting
"Save Changes" dialog box. Am I missing something really simple? I can
send preceding lines if needed.

Thanks in advance,

Loren Poulsen
 
J

Jason Whitlark

GerritM said:
I have never tried this in Word. However I had the same kind of problem in
Visio, which could be solved by setting the document status to saved,
something like:
myWord.ActiveDocument.saved = 1

regards Gerrit


I think "saved" needs to be capitalized

myWord.ActiveDocument.Saved = True

-Jason
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top