If I open an Excel file through PB 12.5 classic using the ShellExcuteW API it opens the file correctly.
I type or change something in the file and close it without saving. Excel does not detect a change and ask if I want to save.
If I open the same file using Excel directly and make a change and try to close, it does detect the change and ask if I want to save.
Is this normal behavior for ShellExecuteW or is there something else I need to do.
Thanks
Dave V.
Excel is Office 2016 and running on Windows 7 64 bit.
Basically I am opening a spreadsheet, running a macro then deleting the macro and savas as... hope this is almost clear as mud..
IF FileExists(ls_excl_sheet) and FileExists(ls_file) then
IF ole_object.ConnectToNewObject("excel.application") = 0 THEN
ole_object.Application.DisplayAlerts = "False"
ole_object.workbooks.Open(ls_excl_sheet) //Open the excel file
Else
MessageBox('OLE Error','Unable to start an OLE server process!',Exclamation!)
END IF
ole_object.Application.Run("GetFileData", ls_file)
ole_object.Application.workbooks(1).RefreshAll
ole_object.Application.workbooks(1).Connections("sched_view").Delete
ole_object.ActiveWorkbook.SaveAs(ls_existing_file,51) //xlOpenXMLWorkbook
ole_object.Activeworkbook.close()
ole_object.Application.Quit()
ole_object.DisconnectObject()
DESTROY ole_object
//remove data file
FileDelete(ls_file)
ls_file = ''
//gnv_app.ShellExecuteW ( handle( this ), "open", ls_existing_file, ls_file, ls_Null, 1)
gnv_app.ShellExecuteW ( handle( this ), "edit", ls_existing_file, ls_file, ls_Null, 1)