Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
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

0 Replies