Passing value to word

J

John

Hi

I am trying to open a word document and pass a value to a public variable
declared in word document, from my vb.net app. The code is given at the end.
The problem is that I can not access either the variable or a sub who (both
declared as public) in word to accomplish the above. What am I doing wrong?

Thanks

Regards

WordDoc = WordApp.Documents.Add("C:\Fax03.dot")
With WordDoc
.Caller = WordEventHandler '<-This variable is not visible
.setcaller(WordEventHandler) '<- and so is this sub
WordApp.Activate()
End With

In word template Fax03.dot, in a module, I have the following;

Public Caller As EventHelper.EventHelper
Public Sub SetCaller(x As EventHelper.EventHelper)
Caller = x
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top