Hi All,
I want to do something really simple. I want to Open a Report in Impromptu, then RUN A MACRO that will save the report as an excel file to a SPECIFIED PATH. The excel file should have the SAME NAME as the original report except with extension .xls. I am able to save the file
to the original path that I opened report from, but to a specified path...haven't been successful. For example below, I want to save the Report to the C:\ location with the same filename as the report e.g. c:\report.xls
Sub Main()
'declare variables
Dim objImpApp As Object
Dim objImpRep As Object
Dim strASCIIFileName As String
Set objImpApp = CreateObject("Impromptu.Application"
'retrieve the active report
Set objImpRep = objImpApp.ActiveDocument
'get the report name and path
strASCIIFileName = Left$(objImpRep.FullName,
Len(objImpRep.FullName) - 4)
'export as an ASCII file
objImpRep.ExportASCII ("c:\" & strASCIIFileName & ".xls" ) --> {*****HELP!!!THIS IS WHERE THE PROBLEM LIES********)
'release variables
Set objImpRep = Nothing
Set objImpApp = Nothing
End Sub
Can anyone Help Point me in the right direction. Am using version 5 of impromptu
I want to do something really simple. I want to Open a Report in Impromptu, then RUN A MACRO that will save the report as an excel file to a SPECIFIED PATH. The excel file should have the SAME NAME as the original report except with extension .xls. I am able to save the file
to the original path that I opened report from, but to a specified path...haven't been successful. For example below, I want to save the Report to the C:\ location with the same filename as the report e.g. c:\report.xls
Sub Main()
'declare variables
Dim objImpApp As Object
Dim objImpRep As Object
Dim strASCIIFileName As String
Set objImpApp = CreateObject("Impromptu.Application"
'retrieve the active report
Set objImpRep = objImpApp.ActiveDocument
'get the report name and path
strASCIIFileName = Left$(objImpRep.FullName,
Len(objImpRep.FullName) - 4)
'export as an ASCII file
objImpRep.ExportASCII ("c:\" & strASCIIFileName & ".xls" ) --> {*****HELP!!!THIS IS WHERE THE PROBLEM LIES********)
'release variables
Set objImpRep = Nothing
Set objImpApp = Nothing
End Sub
Can anyone Help Point me in the right direction. Am using version 5 of impromptu