>Please, I'm looking for the syntax in VFP6.0 to open Word and a file in Word. I've tried:
> oleObj = CREATEOBJECT("WORD.APPLICATION") this give an error
>
> oleObj = CREATEOBJECT("WORD.BASIC") this does not give an error
>
>
> oleobj.documents.open filename:="c:\test.doc" (an existing doc)
> this gives an error
>
>I've hunted through the documentation and can't find a sample. Please point me in the right direction. Thanks
>
>judy scofield
Here is the code I use for executing a Word97 mail merge.
oWord = CREATEOBJECT("Word.Application")
oWord.Documents.Open("Reports\Venteliste.doc")
oWord.Documents("Venteliste.doc").Select
oWord.Documents("Venteliste.doc").MailMerge.Destination = 0 && 0 - New word doc
oWord.Documents("Venteliste.doc").MailMerge.Execute
oWord.Activedocument.Printout
oWord.Activedocument.Close
oWord.Documents("Venteliste.doc").Close
RELEASE oWord
Benn Kjaer
MS Certified Professional - Visual Foxpro
"There is something rotten in the state of Denmark"
"Why make user-friendly programs, when there aren’t any friendly users :o)"