Reply
 
Thread Tools Display Modes
  #1   Report Post  
Karen Hart
 
Posts: n/a
Default Macro to Print and Exit after Merge

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!


  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

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/...PrintrWVBA.htm


--
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
"Karen Hart" wrote in message
ink.net...
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!



  #3   Report Post  
Karen Hart
 
Posts: n/a
Default

Thank you very much, Doug! I really appreciate your time and effort!
Karen Hart

"Doug Robbins" wrote in message
...
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/...PrintrWVBA.htm


--
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
"Karen Hart" wrote in message
ink.net...
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!





Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
faxing from word 2003 mail merge Jo_Wizz Mailmerge 2 January 25th 05 11:31 AM
How do I update Word 2002 to create merged faxes? Imperfect26 Mailmerge 1 January 16th 05 08:10 AM
print a doc without saving... lynn :) Microsoft Word Help 1 December 31st 04 03:16 AM
Mail Merge Problem Cindy M -WordMVP- Mailmerge 0 November 30th 04 05:25 PM


All times are GMT +1. The time now is 04:04 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"