Word doesn't exit with Application.Quit

S

Steve

I executed the following commands in Word 2000 (SP-3) running on Windows 2000:

...
ActiveDocument.SaveAs _
FileName:= OutputFile, _
FileFormat:= wdFormatDocument
Documents(OutputFile).Close _
SaveChanges:=wdDoNotSaveChanges

If Documents.Count = 0 Then Application.Quit

All open documents appear to have been properly closed, but Word doesn't
exit. This was the only Word document that was open at the time. If I
execute File > Exit, the window closes without displaying any messages. Any
idea what I'm doing wrong?

Thanks in advance for your help.
 
S

Steve

Thanks much -- that was the problem. --steve

Default User said:
Which document/template is the code running from?
Is that document/template still open?
If it is, your documents count is never 0, iow the application.quit command
won't fire.

If the above scenario doesn't cover yr situation, you'll have to provide
more info ...

Krgrds,
Perry
 
D

Default User

Which document/template is the code running from?
Is that document/template still open?
If it is, your documents count is never 0, iow the application.quit command
won't fire.

If the above scenario doesn't cover yr situation, you'll have to provide
more info ...

Krgrds,
Perry
 

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