I use VFP 9.0
I create a word object, from an existing word document and I want to place some information in the document. In the program I have:
.....
objWord=CREATEOBJECT("Word.Application")
oDoc = objWord.Documents.Add("&mydoc")
*!* mydoc is the name of an existing word document
objWord.ActiveDocument.paragraphs[1].range.select()
objWord.Selection.TypeText('TO: ')
objWord.ActiveDocument.paragraphs[2].range.select()
objWord.Selection.TypeText('FAX:')
.....
When I execute the program.prg it works, but when I made an exe file it generated the following error:
"Member ACTIVEDOCUMENT does not evaluate to an object"
Where am I wrong?
Thanks in advance
I create a word object, from an existing word document and I want to place some information in the document. In the program I have:
.....
objWord=CREATEOBJECT("Word.Application")
oDoc = objWord.Documents.Add("&mydoc")
*!* mydoc is the name of an existing word document
objWord.ActiveDocument.paragraphs[1].range.select()
objWord.Selection.TypeText('TO: ')
objWord.ActiveDocument.paragraphs[2].range.select()
objWord.Selection.TypeText('FAX:')
.....
When I execute the program.prg it works, but when I made an exe file it generated the following error:
"Member ACTIVEDOCUMENT does not evaluate to an object"
Where am I wrong?
Thanks in advance