Get a word doc to inherit the code from template?

A

AndyE

I have written a fairly complex template that includes code to run when the
document opens. However, the code doesn't exist in the new documents created
from the template and so doesn't run. Is there a way I can incorporate the
code into every new document?
 
A

AndyE

I am going to distribute the template. The problem is that when I create a
new document based on that template, it doesn't inherit the Document Open
code. Is there a way to reference the template or make the code global in
some way so that it will run?
 
J

Jonathan West

AndyE said:
I am going to distribute the template. The problem is that when I create a
new document based on that template, it doesn't inherit the Document Open
code. Is there a way to reference the template or make the code global in
some way so that it will run?

Does the Document_Open code run on your own PC where you wrote it? If so,
what differences can you idendify between how you have Word, the template
and the document set up on ht e second machine?


--
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
 

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