objExcel.EnableEvents = False ' Speeds up Excel during save. Not sure if it good to use
objExcel.DisplayAlerts=False ' Dont show pop ups during save. It stopped asking questions, but it threw an error message because the file already existed. I can check for the file and delete it programmatically.
How do I get it to know to save as a .xls file type that QTP 11 likes?
This doesn't have anything to do with qtp. Just ms office com objects. What version of Office are you working with? If it already exists why don't you use the Save method rather than SaveAs? Workbook.Save Method (Excel)
Im creating the workbook so I have to tell it where to save it.
Can I do this with save?
When using save as the office com says some formatting and the macros will be lost.
I think that the file was opened aw .xlsx manually. It became 22 meg. I copy the sheets to a new workbook.
I do the save manually and the new file is good at about 200kb. But it looses the macros.
I would like to choose the file type programmatically and not have to see question dialogs.
The examples I see online have := after .save. maybe I could use execute file so qtp does not complain.
I"m looking for how to tell the VBA com what format to use. I want to tell it to use Excel 97 - 2003.
The code I see is all for VBA and it uses"
VBScirpt does not know how to handle the semicolon and equals.