Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro -PDF- Sheets

Can i print all sheets in a single pdf file through a macro vbscript?

ex: only one sheets

sub Export
set docprop = ActiveDocument.GetProperties
set ps = docprop.PrintSheetSettings
ps.SheetPrintDrawBackGround = true
ActiveDocument.SetProperties docprop

tempFolder="C:xxxx\Desktop\"
reportName="TestDashboard"
reportFile = tempFolder & reportName & day(date) & monthname(month(date))&".pdf"
'msgbox reportFile
printReportPDF reportFile
ActiveDocument.GetApplication.Sleep 5000
ActiveDocument.sheets("Filtri").print
ActiveDocument.GetApplication.Sleep 5000
msgbox "saved."
end sub
'===========================================================================
Function printReportPDF(pdfOutputFile)
Set WSHShell = CreateObject("WScript.Shell")
WSHShell.RegWrite "HKCU\Software\QlikviewPDF\OutputFile", pdfOutputFile, "REG_SZ"
WSHShell.RegWrite "HKCU\Software\QlikviewPDF\BypassSaveAs", "1", "REG_SZ"
Set WSHShell = nothing
End function

Labels (1)
0 Replies