Ulf Nilsson said:
We have network logon, but we don't want Word to be
updated during logon. It will take a long time if users
logon using modem-connection.
It depends on how big your templates are. Your logon script could also
possibly detect whether the logon is remote and forget about updates until
next time.
Is there a way to update a template automatically using
Word.
Yes, but it can be a bit messy. If you have a template in the Startup
folder, code in a macro called AutoExec will run when the template is loaded
as Word starts. That code can look to see if there are updates available,
and copy files as necessary.
Where it can get messy is that if some of the updated templates are
themselves add-ins in the startup folder, you will need first to ensure that
they are unloaded from Word before the new version can be copied,
overwriting the old. If you don't do that, you will be attempting to
overwrite an open file, and you will get a sharing violation. I've done a
good deal of work on this approach, and have concluded that it can't be made
to work reliably in all circumstances. There are too many variables in terms
of the order in which global templates are loaded, and Word seems to have
some idiosyncracies regaring whether an unloaded global template is *really*
unloaded and can be deleted.
I've come to the conclusion that it is much safer to carry out updates when
Word is not running.