Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
priyankapassi
Contributor III
Contributor III

Macro to create PDF by Bullzip printer

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

1 Solution

Accepted Solutions
Not applicable

Hey Priyanka,

Just try restarting the Qlikview application, it should work good then.

You r welcome....

View solution in original post

2 Replies
Not applicable

Hey Priyanka,

Just try restarting the Qlikview application, it should work good then.

You r welcome....

Anonymous
Not applicable

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?