I created a macro to automatically write PDF's with PDF X-change (pdf creater did not work). It should automatically generate 120 reports, for each 'stichting_naam' one report. It does run but it saves the file as qlikview.printing.pdf. It should save it with the 'stichting_naam' it uses to generate reports. Can someone help me where in the macro I should specifiy this? Thanks!
Sub printpdf
set val=ActiveDocument.Fields("Stichting_naam").GetPossibleValues(1000)
for f=0 to val.Count-1
ActiveDocument.fields("Stichting_naam").Select val.Item(f).Text
ActiveDocument.GetApplication.sleep 10000
reportName01 = f
reportFile = val.Item(f).Text & ".pdf"
HOLA= PrintReportPDF( "RP01", reportFile)
ActiveDocument.GetApplication.Sleep 20000
next
End sub
Function PrintReportPDF(oReport, pdfOutputFile)
ActiveDocument.PrintReport oReport, "PDF-XChange 3.0", false
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile "C:\Users\Lieke Boonen\Documents\projecten\qlikview ","C:\Users\Lieke Boonen\Documents\projecten\qlikview\rapportages"&pdfOutputFile
End Function