PDA

View Full Version : How to refrence a Word 2007 template from a Word 2003 template from MS VB Editor



filipne
04-12-2009, 05:40 PM
Hi,

I have one MS Word 2003 template with several general routines which serves as a VBA code server on a shared drive.
Another MS Word 2003 Template is manually set (through MS VB editor: Tools -> References ) to have a reference to the "server" template.

When a file is created based on the second template, it calls a function in that template which in turns calls a function in the "server" template.

This works fine with MS Word 2003.
When using MS Word 2007 though an error comes out complaining that it cannot find called function on the "server" template.

From Word 2007(VBA Editor) I opened the second template and saw that the reference to the "server" template is not there. When I tried to add it I got the following error:

"Requested type library or wizard is not a VBA project",

although I can see it in the VBA editor as a project.

Then I created a new Word macro enabled template and tried to add a refrence to it the same way as above. Got exactly the same error.

Any help is greatly appreciated !