I'm running a macro to export a report to an .xls file using the Windows scheduler utility.
If the report is read-only, the macro will not finish execution. How can I send a signal in the macro to overcome the read-only message box?
I read the manual about SendKeys "{ENTER}" but it does not seem to work. Perhaps I have not put it in the right place in the script? Thanks in advance for your help.
Set objImpApp = CreateObject("CognosImpromptu.Application"
objImpApp.Visible 1
objImpApp.OpenCatalog _
strPath & "\eis_order_summary.cat","Creator",,"db","passwd"
Set objImpRep = _
objImpApp.OpenReport(strPath & "\mac_hospital_order_summary_v2.imr","2"
>> SendKeys "{ENTER}"
strExcelFileName = strFileDir & "\MSH_order_summary_"
objImpRep.ExportExcel strExcelFileName & yesterday & ".xls"
objImpRep.CloseReport
Set objImpRep = Nothing
Saira
If the report is read-only, the macro will not finish execution. How can I send a signal in the macro to overcome the read-only message box?
I read the manual about SendKeys "{ENTER}" but it does not seem to work. Perhaps I have not put it in the right place in the script? Thanks in advance for your help.
Set objImpApp = CreateObject("CognosImpromptu.Application"
objImpApp.Visible 1
objImpApp.OpenCatalog _
strPath & "\eis_order_summary.cat","Creator",,"db","passwd"
Set objImpRep = _
objImpApp.OpenReport(strPath & "\mac_hospital_order_summary_v2.imr","2"
>> SendKeys "{ENTER}"
strExcelFileName = strFileDir & "\MSH_order_summary_"
objImpRep.ExportExcel strExcelFileName & yesterday & ".xls"
objImpRep.CloseReport
Set objImpRep = Nothing
Saira