Nelviticus
Programmer
According to the VBA help, if you want to run code in another template file or module you can do it in one of several ways:
However none of these seem to work for me. The function I'm trying to run is Public but the first two versions won't even run ('MyTemplate' gives "Compile error: Variable not defined") and the third errors ("Unable to run the specified macro").
I can't even get it to run code in my Normal template. Any idea what I'm doing wrong? We use Word 2002 SP3 and macro security is set to 'Medium' although it still doesn't work even if I set this to 'Low' and enable 'Trust access to Visual Basic Project'.
Thanks
Nelviticus
Code:
MyTemplate.MyModule.MyFunction
Call MyTemplate.MyModule.MyFunction
Application.Run "MyTemplate.MyModule.MyFunction"
However none of these seem to work for me. The function I'm trying to run is Public but the first two versions won't even run ('MyTemplate' gives "Compile error: Variable not defined") and the third errors ("Unable to run the specified macro").
I can't even get it to run code in my Normal template. Any idea what I'm doing wrong? We use Word 2002 SP3 and macro security is set to 'Medium' although it still doesn't work even if I set this to 'Low' and enable 'Trust access to Visual Basic Project'.
Thanks
Nelviticus