Article ID: 171988
Article Last Modified on 7/1/2004
oWordDoc=oWordObj.documents.Add("C:\word\testdot.dot")
Public Sub Mainmacro(str As String, int1 As Integer)
MsgBox str 'Display the string from VFP
MsgBox int1 'Display the number from VFP
End Sub
CLEAR
PUBLIC cname,nnum
cname=SPACE(15)
nnum=0
@ 2,2 SAY "Enter a name to display" GET cname
@ 4,2 SAY "Now enter a number " GET nnum
READ
oWordObj=CREATEOBJECT('word.application')
oWordDoc=oWordObj.Documents.Add
oWordDoc.MainMacro(cname,nnum)
oWordObj.QUIT
Keywords: kbhowto kbinterop kbcode KB171988