Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Referencing a word template

9 views
Skip to first unread message

Mark

unread,
Jul 27, 2006, 5:49:01 AM7/27/06
to
Is there a way with code to reference a template?

We are in the process of moving all our templates to a UNC path and need to
be able to change the existing reference from

C:\Program Files\Microsoft Office\Office10\Startup

to

\\WYP_NT\forms$\Office\Startup

Any solutions would be greatly appreciated.

--
Mark

Jonathan West

unread,
Jul 27, 2006, 6:11:21 AM7/27/06
to

"Mark" <Ma...@discussions.microsoft.com> wrote in message
news:B144EFE2-BD3C-44C3...@microsoft.com...


I really, really would recommend you think again on this. Putting templates
on the network has several significant disadvantages.

1. You increase network traffic significantly, reducing the performance of
applications which *must* use the network

2. When opening any document, Word also opens the template it is based on.
Since the time to open a network template is usually greater than for a
template stored on a local drive, you will increase response times for
opening and creating all documents.

3. If the network or server goes down, many of your organisation's
activities will grind to a halt. Do you really want to add word-processing
to that list?

4. If you change the server location at some future date, Word has a bug in
it such that when you try to open documents created when the templates were
in the old location, Word will hang for perhaps 2 minutes before deciding
that the template at the old network location is not going to be found. This
problem applies only to documents based on templates stored at a UNC
location, not on templates stored on a local drive. There is a patch for
this problem available from Microsoft, but it doesn't seem to be reliable,
and as far as I am aware has never been incorporated into any service pack.

5. If you send Word documents to people outside your organisation, the same
Word bug will result in their copy of Word hanging, since they will not be
able to access the UNC path of your server. You can't assume that your
customers will have the patch installed.

6. Templates that are constantly in use are very hard to update - somebody
is bound to leave a document open overnight, which will maintain a lock on
the network template. You will have to break that lock in order to replace
the template with an updated one.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Mark

unread,
Jul 27, 2006, 6:54:02 AM7/27/06
to
Jonathan,

But is there a way to do this?

Here are our answers to your points.

I really, really would recommend you think again on this. Putting templates
on the network has several significant disadvantages.

1. You increase network traffic significantly, reducing the performance of
applicationswhich *must* use the network

We are going to use DFS distribution which uses multiple
‘servers´atstrategic network points to avoid heavy network traffic

2. When opening any document, Word also opens the template it is based on.
Since the time to open a network template is usually greater than for a

templatestored on a local drive, you will increase response times for

opening and creating all documents.

Same answer as one above.


3. If the network or server goes down, many of your organisation's

activitieswill grind to a halt. Do you really want to add word-processing
tothat list?

Same answer as number one. If the network itself goes down force wide, I
don’t think anybody will be worrying about whether the force forms are
loading. If a server goes down then DFS will redirect the user to another
server automatically.


4. If you change the server location at some future date, Word has a bug in

itsuch that when you try to open documents created when the templates were

in the old location, Word will hang for perhaps 2 minutes before deciding
that the template at the old network location is not going to be found. This
problem applies only to documents based on templates stored at a UNC
location, not on templates stored on a local drive. There is a patch for

thisproblem available from Microsoft, but it doesn't seem to be reliable,

and as far as I am aware has never been incorporated into any service pack.

Same answers as above. Also, remember the design of the U drive is based
around the use of DFS as well and is working successfully for over 2 years.


5. If you send Word documents to people outside your organisation, the same

Wordbug will result in their copy of Word hanging, since they will not be

able to access the UNC path of your server. You can't assume that your

customerswill have the patch installed.


6. Templates that are constantly in use are very hard to update - somebody

isbound to leave a document open overnight, which will maintain a lock on

the network template. You will have to break that lock in order to replace
thetemplate with an updated one.


DFS allows for one server to be unavailable to users yet still replicate
data changes, this means that updates can be made to this share without
disconnecting users from the existing template. Template updates to other
servers will then become available as the file becomes unlocked.

--
Mark

Jonathan West

unread,
Jul 27, 2006, 8:35:58 AM7/27/06
to
Hi Mark,

If you think that its OK to move to putting templates on the server, I don't
recommend it, but I'll tell you what you need to do.

I'm assuming here from the context that the situation is as follows:
templates that were formerly at C:\Program Files\Microsoft
Office\Office10\Startup were automatically loaded as add-ins, and you want
the templates still to be automatically loaded as add-ins in their new
location.

It can be done by hand in Word by going to Tools, Options. Click the File
Locations tab. Select the Startup folder, click the Modify button and browse
to the appropriate folder where your global add-ins are located.

If you are also moving templates that documents are based on onto the
network, do the same for the Workgroup Templates folder (which is probably
not currently set to anything at all) and point it to where those templates
are held.

Do not under any circumstances change the User Templates path to a shared
folder. Doing this would change the location where Word looks for
normal.dot. Trying to share normal.dot between multiple users is a recipe
for several varieties of chaos.

The same thing can be done using automation by setting the values of the
Options.DefaultFilePath(wdStartupPath) and
Options.DefaultFilePath(wdWorkgroupTemplatesPath) properties

You can also set this directly in the registry, by setting the following
values in this key:

HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Common\General

(Within that key, 10.0 is for Office XP. Change it to 9.0 if you have Office
2000 or 11.0 if you use Office 2003)

Within this key, you should set the SharedTemplates value to the path for
the Workgroup templates, and the Startup value to the path for your global
add-ins.

If you have multiple users sharing a single PC, then you need to modify the
equivalent key for every user.

By the way, I have a commercial client (a major internet services company)
who thought as you did and placed all the templates I had made for them on
the network despite my warnings. After a year or so, they decided I was
right and changed to local installation. Items 4 & 5 turned out to be the
decisive issue for them.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"Mark" <Ma...@discussions.microsoft.com> wrote in message

news:73417631-D5EC-4953...@microsoft.com...

Charles Kenyon

unread,
Jul 27, 2006, 9:43:18 PM7/27/06
to
Instead of hard-coding the path:
1) put these files in the Word rather than the Office startup folder.
2) reference the current Word startup folder path location
Application.Options.DefaultFilePath(wdStartupPath)

3) You can do the same thing with the workgroup templates path.

But, if you actually have these templates in the Word startup folder, you
will not need a reference. You can call procedures with Application.Run.

I strongly concur in Jonathan's suggestions. Otherwise, if you want to edit
one of these, you will have to kick everyone in your network off from Word.
This will not make you popular. It is much easier to have local copies
updated upon login (and force daily logins) than it is to have everyone
referencing the same files simultaneously.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


"Mark" <Ma...@discussions.microsoft.com> wrote in message

news:B144EFE2-BD3C-44C3...@microsoft.com...

0 new messages