Robert Andrews
2006-07-11 08:27:50 UTC
Hi All,
I have a globall addin called abc.dot. This addin contains a function called
ProcessDocument.
i.e. Function ProcessDocument (docGeneratedDocument) as Boolean. The
function is located is a module called Master. Note that the same function
may exist in a different global template e.g. def.dot. The template is
loaded by an AutoOpen sub which is located in a template which is attached
to the document.
What happens is that the user attaches a template to document. The template
contains AutoOpen code and a reference to a global addin file. When the user
opens the document the autoopen function determines the global addin to load
from a variable within the template and then loads the appropriate addin.
Each global addin will contains a function called ProcessDocument.
So when I am coding the template to attach to the document I don't know what
global template I will be loading as the user can change this value in the
template.
At preset I call this function from attached template using WordBasic. ie.
Result = WordBasic.Call("Master.ProcessDocument", ActiveDocument). This
works correctly.
I was wondering if there is a way of doing this in native VBA without having
to call WordBasic?
Many thanks in advance for your help.
I have a globall addin called abc.dot. This addin contains a function called
ProcessDocument.
i.e. Function ProcessDocument (docGeneratedDocument) as Boolean. The
function is located is a module called Master. Note that the same function
may exist in a different global template e.g. def.dot. The template is
loaded by an AutoOpen sub which is located in a template which is attached
to the document.
What happens is that the user attaches a template to document. The template
contains AutoOpen code and a reference to a global addin file. When the user
opens the document the autoopen function determines the global addin to load
from a variable within the template and then loads the appropriate addin.
Each global addin will contains a function called ProcessDocument.
So when I am coding the template to attach to the document I don't know what
global template I will be loading as the user can change this value in the
template.
At preset I call this function from attached template using WordBasic. ie.
Result = WordBasic.Call("Master.ProcessDocument", ActiveDocument). This
works correctly.
I was wondering if there is a way of doing this in native VBA without having
to call WordBasic?
Many thanks in advance for your help.