Hi Inge,
>I have collected data into an excel document:
>SELECT * FROM myTable
>COPY TO c:\temp\tempxls TYPE XLS
>
>I have created a form letter in Microsoft Word (data from tempxls). Can I print this form letter from within my VFP program?
>
>Thank you all!
Yes. You want to use Office Automation. A simple outline of what you might need is:
oWord = CREATEOBJECT('Word.Application')
oWord.Documents.Open("MyMergeDoc.doc")
oDoc = oWord.ActiveDocument
oDoc.MailMerge.Execute()
There are a few more subtlties to making it work smoothly and changing the data, but its not too difficult.
Check out the example of Fox automation in the VFP samples for more ideas about automation.
Do Home() + "Samples\Solution\Solution.app"
You also might want to go to
www.hentzenwerke.com and purchase "Office Automation in Visual FoxPro"
Pamela