J
james_davey1
I've been stuck for far too long on this - please can someone help
me ?!
Ok, here's what I'm doing. I have a word template (.dot) with loads of
code in it. It's in startup.
I am opening a new document, inserting a code module, and I want to
call a function in the template (which is loaded)
Apparently this seems impossible?
For example, if I create a routine in my template:
Public sub Check()
...whatever...
End sub
I can run it from my other code module using
application.run("templatename.modulename.Check")
However if I change sub to function - one big error.
I also cannot pass anything in to this routine when it's a sub. For
example:
application.run("templatename.modulename.Check", arg1) will not get to
Public Sub Check (arg1 as var) in the template.
Surely this is possible? Exactly the same thing works fine in Excel
VBA... what am I missing???
Any help would be much appreciated
me ?!
Ok, here's what I'm doing. I have a word template (.dot) with loads of
code in it. It's in startup.
I am opening a new document, inserting a code module, and I want to
call a function in the template (which is loaded)
Apparently this seems impossible?
For example, if I create a routine in my template:
Public sub Check()
...whatever...
End sub
I can run it from my other code module using
application.run("templatename.modulename.Check")
However if I change sub to function - one big error.
I also cannot pass anything in to this routine when it's a sub. For
example:
application.run("templatename.modulename.Check", arg1) will not get to
Public Sub Check (arg1 as var) in the template.
Surely this is possible? Exactly the same thing works fine in Excel
VBA... what am I missing???
Any help would be much appreciated