>Sorry if this isn't the right category - shows what I know <g>.
>
>I want to do what the title says: no mail merge, no changing content.
>
>I just want to print a word document (say a product spec sheet) from within VFP.
>
>Would appreciate help in finding the right tech ref to explain how. I dug a bit, but my shovel is tired...
>
>Thanks
Hi Dennis,
Below is some sample code for opening and then printing a Word document from VFP. I assume it would be wise to implement some error trapping to make sure Word exists, etc, but the basics of opening and printing the document are outlined below.
oWord=CREATE('Word.Application')
oWord.Documents.OPEN("C:\DOCFOLDER\DOCNAME.DOC")
oWord.ActiveDocument.PrintOut(0)
oWord.ActiveDocument.CLOSE(0)
oWord.QUIT(0)
RELEASE oWord
I would highly recommend Tamar Granor's book "Microsoft Office Automation with Visual FoxPro" published by Hentzenwerke Publishing.
HTH,