Create reference to .cls file in Word Template

P

pnp

Hi all

We are facing the problem that Word 2003 doesn't automatically update header
and footer fields anymore.

We have a classification written in these fields and it need to be updated
at load every time.

We have written a macro that does the job, i have exported this macro to an
..cls file, and placed it in our template repos.

My question is know - how do i reference this class file from another
template. I would really like to have one file with the code in, and then all
other templates referencing this. We have appr. 120-130 templates - and
maintaining macrocode in each of them is not a good solution.. :)

Is there any "standard" procedure for creating this setup? I can easily
import the code in each template and it works like a charm, but as stated
above, maintaining the same code in 100+ templates is not that good.

Hopefully somebody can help me out here...

/Anders
 
P

Perry

Any reason why you have to port this .CLS (classmodule file) to the
templates?
Why not use a global addin including the functionallity hosted by this
classmodule and let yr (model) boilerplate templates make use of the
functionallity in the global addin?

Here are a couple of tutorials on global templates.

http://word.mvps.org/macwordnew/globaltemplatecontent.htm

http://word.mvps.org/faqs/customization/WhatTemplatesStore.htm

http://word.mvps.org/macwordnew/installtemplateonmaccontent.htm

-------------------------------------
Krgrds,
Perry

System parameters:
POS: WinXP SP2
MSO: MSOffice 2003 SP2
DEV: VS8 (dotnet)
 
P

pnp

Maybe that is a good approach. I'll try that.

The reason for the class module file is size. I am only interested in the
macro code - nothing else. And the word document is over ten times the size
of the cls file. 2 vs. 28 kb.

With 200+ users using this for all their documents is it fast becoming some
extra data (unnecessary) transferring on our network.

But if the other solution is not possible i guess i have to go that way,
i'll try it out.

/Anders
 

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