Article ID: 185511
Article Last Modified on 11/23/2006
Sub PrintAll()
Dim aDoc as Document
For Each aDoc In Documents
aDoc.PrintOut
Next
End Sub
You may want to close each document after printing; however, the
updating of certain field codes in the process of repagination will modify the
document, causing Word to prompt you to save the document. To automate the
closing of documents without the save changes message, add the SaveChanges
argument to Line 3 as shown:
aDoc.PrintOut
aDoc.Close SaveChanges:=wdDoNotSaveChanges
Next
aDoc.PrintOut
aDoc.Close SaveChanges:=wdSaveChanges
Next
163435 VBA: Programming Resources for Visual Basic for Applications
173707 OFF97: How to Run Sample Code from Knowledge Base Articles
Additional query words: vba word98 macword
Keywords: kbhowto kbinfo KB185511