Players: VFPSP2, Win10 Pro, existing Excel 2016 XLSX file
I'm using automation coding to open an exisitng Excel file, write to it, and then save it as the same name. How can I force that without the system asking me to confirm? What's the SET SAFETY OFF equivalent? My HWP Tamar Granor/Ted Roche book is at home so hoping to get a tip before the work day is over.
Here's my line of coding saving it: this.oExcel.ActiveWorkBook.SaveAs(ADDBS(this.cPath)+this.cFile)
(Did the Office automation book get released into the public domain like Hackers Guide and Stonefield Database Toolkit did yet?)
tia,
--Mike
IIRC there is a Saved property of the workbook object. Just set that to .t. and it will not prompt you when you get rid of the Excel object. Something like:
m.loExcel.ActiveWorkbook.Saved=.T.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of MB Software Solutions, LLC Sent: Monday, March 2, 2020 11:58 AM To: profoxtech@leafe.com Subject: Using Office Automation - Excel (2016), SaveAs to overwrite existing file without prompt
Players: VFPSP2, Win10 Pro, existing Excel 2016 XLSX file
I'm using automation coding to open an exisitng Excel file, write to it, and then save it as the same name. How can I force that without the system asking me to confirm? What's the SET SAFETY OFF equivalent? My HWP Tamar Granor/Ted Roche book is at home so hoping to get a tip before the work day is over.
Here's my line of coding saving it: this.oExcel.ActiveWorkBook.SaveAs(ADDBS(this.cPath)+this.cFile)
(Did the Office automation book get released into the public domain like Hackers Guide and Stonefield Database Toolkit did yet?)
tia,
--Mike
Dne 2.3.2020 v 17:58 MB Software Solutions, LLC napsal(a):
Players: VFPSP2, Win10 Pro, existing Excel 2016 XLSX file
I'm using automation coding to open an exisitng Excel file, write to it, and then save it as the same name. How can I force that without the system asking me to confirm? What's the SET SAFETY OFF equivalent? My HWP Tamar Granor/Ted Roche book is at home so hoping to get a tip before the work day is over.
Here's my line of coding saving it: this.oExcel.ActiveWorkBook.SaveAs(ADDBS(this.cPath)+this.cFile)
(Did the Office automation book get released into the public domain like Hackers Guide and Stonefield Database Toolkit did yet?)
tia,
--Mike
oExcel.DisplayAlerts = .F.
[excessive quoting removed by server]