I tried this, and I'm getting a compile error on the CPApp line. Here is my code (maybe I didn't put the lines in the right place? Macros are new to me!)
Sub Main ()
Dim objImpApp as object
Dim objImpRep as object
Set objImpApp = Createobject("CognosImpromptu.Application"
ObjImpApp.OpenCatalog "q:\Catalogs 7.0\DMSAU_data.cat", "Developer"
Set objImpRep = objImpApp.OpenReport ("q:\DMS CUSTOM REPORTING\PO Reports\DMSAU REPORTS\DMS PO PRINT.imr"
objImpRep.RetrieveAll
PtrClr$ = "\\netserver\devicename" 'Your network printer
CPApp.FileSetPrinter PtrClr$
objImpRep.PrintOut ,,1
objImpRep.CloseReport
objImpApp.Quit
Set objImpRep = Nothing
Set objImpApp = Nothing
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.