Thierry ---
Office automation! Fun and easy :-)
My VBA help died on my computer, so my syntax may be a little off, but consider the following:
--- Excel Automation
oExcelSheet=CREATEOBJECT("Excel.Application")
oExcelSheet.Workbooks.Open("mydocument.XLS")
oExcelSheet.Workbooks.ActiveWorkbook.Print
--- Word Automation
oWordDoc=CREATEOBJECT("Word.Application")
oWordDoc.Document.Open("mydocument.DOC")
oWordDoc.Document.ActiveDocument.Print
>Hello. I'm fairly new to the FoxPro environment and an struggling with issues that may be trivial to some of you. I would like to have the ability to print out a word document or excel sheet when an activity button is clicked. All suggestions are welcome.
>
>Sincerely,
>
>Thierry
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05