If you look around the object model, you might find a switch to turn off user dialogs. -Lew
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Hart Sent: Tuesday, September 11, 2007 5:51 PM To: ProFox Email List Subject: RE: Excel 2007 Automation Question Hi Gary Looked at some of my code which works in Excel 2007 oExcel.ActiveWorkbook.SaveAs(lcFileName,xlExcel8) Cheers Peter Peter Hart Computers -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Garry Bettle Sent: 11 September 2007 20:01 To: [email protected] Subject: Excel 2007 Automation Question Howdy all, Hope this email finds everyone well. I have a program that when it's finished processing, writes out a cursor to a XLS file: COPY TO ( tcFilename) FIELDS EXCEPT NewLPM TYPE XLS I then open this file within VFP with automation to fix a few columns: oExcel = CREATEOBJECT( [Excel.Application]) IF VARTYPE( oExcel) = [O] WITH oExcel .Application.Workbooks.Open( FULLPATH( tcFileName)) .Visible = False .Selection.End( xlToRight).Offset(,1).Select .ActiveCell.FormulaR1C1 = [1] .ActiveCell.Select .Selection.Copy .Range( [F1:G1]).Select .Range( [G1]).Activate .Range( .Selection, .Selection.End( xlDown)).Select .Selection.PasteSpecial( xlPasteAll, xlMultiply, False, False) etc. The last few lines of the WITH are: .DisplayAlerts = False .Save .Quit ENDWITH This works a treat before Excel 2007 but now Excel 2007 comes up with a dialog, asking for the user to save the file. Does anyone have a solution? Many thanks! Cheers, Garry - - - - - - - - - - - - Yesterday it worked Today it is not working Windows is like that - - - - - - - - - - - - [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

