How to autoclose an open word document?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • walkabout
    New Member
    • Aug 2007
    • 1

    How to autoclose an open word document?

    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.Coun t = 0
    'Close no save
    .Documents(1).C lose SaveChanges:=wd DoNotSaveChange s
    Loop

    'Quit Word no save
    .Quit SaveChanges:=wd DoNotSaveChange s
    End With
    End Sub
Working...