Print and Exit withou Saving

T

Tim

Hi,

I use this code and it works great...

ActiveDocument.PrintOut
Application.DisplayAlerts = False
ActiveDocument.Application.Quit
Application.DisplayAlerts = True

But when I open my word attachment from Outlook, I still keep getting the
"do you want to save prompt"....

Would anyone know why it works fine when you open a normal file but when you
open an attachment from outlook the code doesn't work?

Thx :)
 
D

Doug Robbins

Use

With ActiveDocument
.PrintOut
.Close wdDoNotSaveChanges
End With

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
Top