Article ID: 185196
Article Last Modified on 8/21/2007
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:
For Each aDoc In Documents
aDoc.PrintOut
aDoc.Close SaveChanges:=wdDoNotSaveChanges
Next
For Each aDoc In Documents
aDoc.PrintOut
aDoc.Close SaveChanges:=wdSaveChanges
Next163435 VBA: Programming Resources for Visual Basic for Applications
173707 OFF97: How to Run Sample Code from Knowledge Base Articles
Additional query words: vba word97 word8
Keywords: kbhowto kbhowto kbinfo kbmacroexample KB185196