Global Macros Template Always Locked...Can't Edit

G

Gary B (Irvine)

Using Word 2003. I have several document templates on a network share and
those templates use a common set of procedures in another GlobalMacros.dot
file so that I'd only have to maintain one set of code rather than
duplicating the same code in each document template. The templates include
code that make sure the GlobalMacros.dot template is listed on the user's
Tools > Templates and Add-ins. This has been working fine for a few weeks.

Now I find that I need to make a change to a procedure in GlobalMacros.doc.
However, whenever I try to open GlobalMacros.dot, Word opens it as Read-Only
so I can never save my changes. I'm guessing that one or more of the user's
on the network share have a document open that is based on a document
template that is using the GlobalMacros.dot procedures, or the fact that
GlobalMacros.dot is now listed as a attached template in their Tools >
Templates and Add-ons (even when they don't have a template based document
open), the system has the file locked and I can't do any updates. I can copy
GlobalMacros.dot to another file and make changes, but when I go to rename it
back to GlobalMacros.dot, the system says it can't overwrite a file because
someone has it open or locked.

With 20+ users on a worldwide basis, there's almost no time during the day
when a file based on these templates won't be open somewhere. Plus, there
doesn't seem to be a way to find out who has the file open so you could tell
them to shut down (and even if you did, someone else might come along and
open a file).

So how do you go about sharing a common set of code between multiple
document templates, but still be able to update the code in a multi-user
environment?

Thanks very much!
 
G

Gary B (Irvine)

Jay,

Thanks for taking the time to reply and provide a possible solution.

Gary
 
D

Doug Robbins - Word MVP

The following information might also be of interest to you:

----- Original Message -----
From: "Chad DeMeyer" <cjdemeye at bechtel dot com>
Newsgroups: microsoft.public.word.vba.addins
Sent: Thursday, August 12, 2004 4:10 PM
Subject: Re: Need to change how we distribute firm templates?

Colleen,

Using a logon script to copy latest version of add-in templates to StartUp
folder is probably the best solution for the templates containing
autotext,
macros, etc. However, I would answer your objection to using the
Workgroup
Templates location for the other templates with this:

When a user has a document created from one of those templates open and
they
are connected to the network, a file lock is in fact created that prevents
the template itself from being opened with Modify access. However, these
file locks can be released, with no adverse affect to the end users who
created them, by using any of a number of standard utilities that close
open
resources on a network. The only catch is that the person using the
utility
must have adequate permissions on both the network share and the Workgroup
Templates folder itself, in other words Admin rights. On my Windows 2000
box, I can do this through the UI with Start>Settings>Control
Panel>Administrative Tools>Computer Management>Action>Connect to another
computer... type name of network server>System Tools>Shared Folders>Open
Files, find any open resources for that template, right-click and select
'Close open file'. Even easier is to use the command line utility OFL,
which when used with the right switches will automatically close any open
resources connected to a specified template.

Regards,
Chad


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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