J
Jan Hendrickx
Hi all,
From a HTML-page I use following code to create a new word-document :
Set oWord = CreateObject("Word.Application")
oWord.Documents.Add("C:\Map1\Doc1.dot")
oWord.Visible = True
oWord.Activate
oWord.Run "Test1"
The last line runs a procedure that is stored in the documents module
(Module1)
Before running that last line, I want to pass a value to a variable that
is declared in the same module.
This is 'Module1':
Public sText1 As String
Public Sub Test1
msgbox sText1
End Sub
The help-files show that I could also use oWord.Run "SubName", var1, var2,
var3, ...
but I can't get that to work!!!
I also tried things like 'oWord.sText1="abcde"' or
'oWord.Module1.sText1="abcde"'
but that doesn't work either...
Any hints???
Thanx in advance
Jan Hendrickx
From a HTML-page I use following code to create a new word-document :
Set oWord = CreateObject("Word.Application")
oWord.Documents.Add("C:\Map1\Doc1.dot")
oWord.Visible = True
oWord.Activate
oWord.Run "Test1"
The last line runs a procedure that is stored in the documents module
(Module1)
Before running that last line, I want to pass a value to a variable that
is declared in the same module.
This is 'Module1':
Public sText1 As String
Public Sub Test1
msgbox sText1
End Sub
The help-files show that I could also use oWord.Run "SubName", var1, var2,
var3, ...
but I can't get that to work!!!
I also tried things like 'oWord.sText1="abcde"' or
'oWord.Module1.sText1="abcde"'
but that doesn't work either...
Any hints???
Thanx in advance
Jan Hendrickx