Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,
I am using following macros for creating PDF. PDF is getting created properly but macro gets open after that.
Pls help..
Sub CreateReport
'ActiveDocument.Sheets("SH01").Activate
'ActiveDocument.reload
vReport = "RP01" 'Set report
vName = "Pdf Report" 'Name of output pdf
ActiveDocument.PrintReport(vReport),"Bullzip PDF Printer",false 'Printreport
reportFile = "D:\" & vName &".pdf" 'Setting outputname
MyPrintPDFWithBullZip(reportFile) 'Call pdf printer
'ActiveDocument.Sheets("SH01").Activate
MyPrintPDFWithBullZip_Transaction(File_Transaction) 'Call pdf printer
ActiveDocument.GetApplication.Sleep 5000
'mailrapport
'SendMail
ActiveDocument.Save
ActiveDocument.GetApplication.Sleep 5000
'ActiveDocument.GetApplication.Quit
End sub
FUNCTION MyPrintPDFWithBullZip(pdfOutputFile)
'set obj = CreateObject("Bullzip.PDFPrinterSettings")
set obj = CreateObject("Bullzip.PdfSettings")
obj.PrinterName = "Bullzip PDF Printer"
obj.SetValue "Output" , pdfOutputFile
obj.SetValue "ConfirmOverwrite", "no"
obj.SetValue "ShowSaveAS", "never"
obj.SetValue "ShowSettings", "never"
obj.SetValue "ShowPDF", "no"
obj.SetValue "RememberLastFileName", "no"
obj.SetValue "RememberLastFolderName", "no"
obj.SetValue "ShowProgressFinished", "no"
obj.SetValue "ShowProgress", "no"
obj.WriteSettings True
msgbox "PDF Created"
END FUNCTION
Thanks in advance
Priyanka
Hey Priyanka,
Just try restarting the Qlikview application, it should work good then.
You r welcome....
Hey Priyanka,
Just try restarting the Qlikview application, it should work good then.
You r welcome....
Hi I tried this and it is working perfectly. When I run this macro via button, a message box is coming up as mentioned in the script as 'pdf report' with a OK button.
When I click on OK button the macro module editor is opening. Any idea to ignore this?