>>loWord.documents.open(MyFile) >>loWord.visible = .t. &&Word now appears in the taskbar >>loWord.activate() &&the word icon in the taskbar flashes but VFP is still the active window >>>>
>#DEFINE wdWindowStateMinimize 2 >#DEFINE wdWindowStateMaximize 1 > >loWord.WindowState = wdWindowStateMinimize >loWord.WindowState = wdWindowStateMaximize && this automatically makes the window activatedIt worked! Thanks.
loExcel = createobject("Excel.application") loDoc = loExcel.Workbooks.add() &&<-- Here's where I get the message loExcel.ActiveWorkbook.saveas(MyFile) loExcel.ActiveWorkbook.close()