709-218-7927 The Landfall Garden House 60 Canon Bayley Road 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
7092187927 CPRGreaves@gmail.com Bonavista, Friday, December 04, 2020 5:55 PM Copyright © 1996-2020 Chris Greaves. All Rights Reserved. |
---|