set up Word to automatically close after a period of time

T

Tony

I need to be able to close a word document automatically after a period of
say 1 hour when it is not in use. The reason for this is that this document
is available to several people and sometimes users forget to close it when
they are finished which means noone else can save changes.
 
H

Helmut Weber

Hi Tony,

I don't know your level of programming skills,

but one could use a windowselectionchange-event
to set the expiration time in an ontime macro to one hour.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
G

Greg Maxey

That is above my head, but aren't you taking a risk that that user who has
neglected his/her document for an hour may or may not want to save changes
made. AFAIK there is no way a macro can make that decision.
 
T

Tony Jollans

I second that and would also add that it is possible to type away quite
happily without firing the WIndowSelectionChange event (or any other event)
and would recommend prompting the user and waiting a while longer before
automatically closing (and perhaps saving a copy if there are unsaved
changes). As Helmut says, this is advanced programming.
 
D

Dennis S

Tony:
Rather than closing a file after an hour of non-use, the following may be a
better solution...

Every time WORD opens a document, it creates another version of the document
with the same name except the first character of the filename is replaced
with "~$". You could check for this file prior to accessing a document and
check the owner of "~$" to determine who has the file open and create an
alert to user of the person who currently has the file.

You may want to refer to Microsoft Knowledgebase article Q211632.

Good Lock...

Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top