By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,930 Members | 1,269 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,930 IT Pros & Developers. It's quick & easy.

How to autoclose an open word document?

P: 1
A shared document is left open frequently so need a script that detects 5 minutes inactivity and saves changes and closes document.

thanks.

could mod the following but needs to save changes and detect inactivity.

Sub CloseAll()
'Close all open files and shutdown Word

With Application
.ScreenUpdating = False

'Loop Through open documents
Do Until .Documents.Count = 0
'Close no save
.Documents(1).Close SaveChanges:=wdDoNotSaveChanges
Loop

'Quit Word no save
.Quit SaveChanges:=wdDoNotSaveChanges
End With
End Sub
Aug 29 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.