Can't Close Word Instance without Save Changes Dlg Box

GerritM gmuller at worldonline.nl
Mon Jul 21 19:37:51 CEST 2003


<PoulsenL at capanalysis.com> schreef in bericht
news:mailman.1058804373.21700.python-list at python.org...
> 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
>
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
--
www.extra.research.philips.com/natlab/sysarch/







More information about the Python-list mailing list