Can't Close Word Instance without Save Changes Dlg Box

Jason Whitlark jwhitlark at attbi.com
Thu Jul 24 23:24:25 EDT 2003


"GerritM" <gmuller at worldonline.nl> wrote in message news:<bfh8d3$3h$1 at reader1.tiscali.nl>...
> <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


I think "saved" needs to be capitalized 

myWord.ActiveDocument.Saved = True

-Jason




More information about the Python-list mailing list