709-218-7927 The Landfall Garden House 60 Canon Bayley Road Bonavista, Newfoundland CANADA A0C 1B0 |
---|
Close All Take No Prisoners
Tuesday, June 7, 2011
Although as a rule I "Never Close, Never Minimize", I confess to times when I have literally dozens of documents left open after a failed attempt to batch-process a folder.
At that time I like to fix the problem and start with a clean slate.
The little macro below shrugs and wipes my slate clean!
Public Sub CloseAllTakeNoPrisoners()''' Close all open documents without saving a single one; discard all recent changes.
Dim doc As Document
For Each doc In Application.Documents
doc.Close savechanges:=wdDoNotSaveChanges
Next doc
If Documents.Count > 0 Then
Documents.Close savechanges:=wdDoNotSaveChanges
Else
End If
End Sub
709-218-7927 CPRGreaves@gmail.com Bonavista, Sunday, December 08, 2024 9:33 AM Copyright © 1990-2024 Chris Greaves. All Rights Reserved. |
---|