Project visibility with global templates

  • Thread starter J.J.T.B Somhorst
  • Start date
J

J.J.T.B Somhorst

Dear sir/madam,

I have developed an word template which I placed in the startup directory of
word. It contains general functionality which should be used by other
templates I going to develop.

The problem is as follows. When I open word I can see that the code in the
startup template is triggerd correctly. In one situation I have a program
(Lotus Notes) which triggers word to create a new document using a template
stored in the database. When I refer to code from the startup template in
this template I get compilation errors because it cannot find the code it
searches for. The strange thing is that I can see the startup template in the
visual basic designer but it is not available for editing at all.

Could someone help me with this issue? I need to reference the global
template because I dont want to put the exact same code in 40 different
templates because that would be to hard to maintain as you can imagine.

Many thanks in advance.
 
M

Manfred F

Hi,
...
stored in the database. When I refer to code from the startup template in
this template I get compilation errors because it cannot find the code it
searches for. The strange thing is that I can see the startup template in the
...

You have to set a reference in Your template to the global template. Use
"tools, references" (w2003) to establish one..

Regards,
Manfred
 
J

J.J.T.B Somhorst

Hello ,

Thanks for the information but this does not work. When I add the reference
I get an error:

"Name conclicts with existing module, project or object library."

I think this has something to do with the startup template being already
loaded. But how to add a reference without getting that error?
 
R

Rhonda E. Gray

If you have not already done so, you need to set a reference to the startup
template. From the VBA Editor, select Tools, References... You should see
your startup template.

You also want to make sure that the procedures in your startup are public.
If not, you can receive compilation errors.

url:http://www.ureader.com/msg/102212067.aspx
 
J

J.J.T.B Somhorst

Hello,

I as stated in my previous post ( as reply on Manfred F ) I can not add the
reference because it conflicts with another object/project or library
(according to word).

When I remove the template from the word startup folder and add an reference
it works but I want to have it stored in this location so that is always
loaded when word starts.

When I try to open the project (startup) in de VBE I got the error that the
project is unviewable.
 

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