I am trying to write a macro that merges, then prints and exits without
saving, when the merge is complete.
I have the following, but it gives me a prompt whether or not to save before
it exits. I would like it NOT to prompt, just exit without saving:
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0,
_
PrintZoomPaperHeight:=0
ActiveDocument.Close
Does anyone know the command to close without prompting to save?
Thanks in advance!
Doug Robbins - 11 Feb 2005 02:37 GMT
See the article "How to do a mail merge to the printer using VBA, without
displaying the Print dialog" at:
http://word.mvps.org/FAQs/MailMerge/MergeStraightToPrintrWVBA.htm

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
>I am trying to write a macro that merges, then prints and exits without
>saving, when the merge is complete.
[quoted text clipped - 13 lines]
> Does anyone know the command to close without prompting to save?
> Thanks in advance!
Karen Hart - 11 Feb 2005 21:10 GMT
Thank you very much, Doug! I really appreciate your time and effort!
Karen Hart
> See the article "How to do a mail merge to the printer using VBA, without
> displaying the Print dialog" at:
[quoted text clipped - 18 lines]
>> Does anyone know the command to close without prompting to save?
>> Thanks in advance!