Has anyone run Word macros externally via the Word object model? The MSDN docs describe using the Application.Run method, which I am using. This is my source:
My macro looks like this:
In Normal template, module MyMacros:
public sub DoSomething()
' Something done here
end sub
My code looks like this:
anOpenDoc.Application.Run("Normal.MyMacros.DoSomething"
I receive error "Unable to run the specified macro".
To make sure I was making the correct call, I added another module to the document (not in Normal) and stepped through this call:
Application.Run("Normal.MyMacros.DoSomething"
This, of course, work correctly. Anyone know what I'm doing wrong?
My macro looks like this:
In Normal template, module MyMacros:
public sub DoSomething()
' Something done here
end sub
My code looks like this:
anOpenDoc.Application.Run("Normal.MyMacros.DoSomething"
I receive error "Unable to run the specified macro".
To make sure I was making the correct call, I added another module to the document (not in Normal) and stepped through this call:
Application.Run("Normal.MyMacros.DoSomething"
This, of course, work correctly. Anyone know what I'm doing wrong?