Code: Select all
Sub Print_DUCA()
Application.DisplayAlerts = wdAlertsNone
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
Application.DisplayAlerts = wdAlertsAll
End Sub
I bracketed it with the "Application.DisplayAlerts" anticipating that the pop-up box (below) would not appear, but I still get the (annoying) message.
The document (an envelope) prints correctly when I respond "yes" to the pop-up box.
I have used "Application.DisplayAlerts" with success in Excel 2000, but can't recall if I used it in Word 2000".
The Word 2002 VBA help example is quite clear; it says it should work.