In my word doc I have the following code (under this document);
Public Caller As EventHelper.EventHelper
Public Sub SetCaller(x As EventHelper.EventHelper)
MsgBox "I am here", , "Caller = x"
Caller = x '<-- This line causes exception in my vb.net app
' the macro runs fine from vb.net app if the above line
is commented out
End Sub
"John Smith" <Jo**@Y.com> wrote in message
news:O1**************@TK2MSFTNGP09.phx.gbl...
Let's say your word macro is:
Sub MyWordMacro(sStringParam As String)
MsgBox "This message comes from Word. The value passed is " &
sStringParam
End Sub
In your dotnet code you do:
Call oApp.Run("MyWordMacro", "Your Value")
Note: oApp is Word Application object and also you might have tp qualify
the macro name with module name.