Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
here`s the problem: I need an VB-Script that can save a QV Report as PDF File with the Program "PDF Creator". But the Guys from the "PDF Creator" have changed the COM Interface. So my old macro do not work anymore!
I just need a new Macro for the new COM Interface from the PDF Creator, so I can save that QV Report as PDF File.
This helped me http://docs.pdfforge.org/pdfcreator/2.5/en/pdfcreator/com-interface/
but I`m not at the finish line yet.
Thanks for any help
Greetings from Germany
David
Hello Community,
Update: i solved the problem myself The PDFCreator Documentation with the new COM Interface Settings was helpfull --> http://docs.pdfforge.org/pdfcreator/2.1/en/com-interface/reference/settings/
Here is my Code based on a VB-Script:
Dim QV, Doc
Set QV = CreateOject("QlikTech.QlikView")
WScript.Sleep 3000 'Wait 3 sec for qlik to open
Set Doc = QV.OpenDoc("C:\Users\********\Desktop\Test.qvw")
'Start PDF Creator Application
Set pdfJob = CreateObject("PDFCreator.JobQueue"): pdfJob.Initialize
'Print QV Report
Doc.PrintReport "Document\RP01", "PDFCreator"
With pdfJob
.WaitForJob (10) 'Wait max 10 Sec for the job
If .Count = 0 Then 'Quit if there is no job
.ReleaseCom: Doc.CloseDoc: QV.Quit
Set pdfjob = Nothing
Set printJob = Nothing
WScript.Echo "Error: There is nothing for me :("
WScript.Quit
End If
Set printJob = .NextJob
End With
With printJob
.SetProfileByGuid ("DefaultGuid")
.SetProfileSetting "OpenViewer", "False"
.SetProfileSetting "ShowProgress", "False"
.ConvertTo ("C:\Users\********\Desktop\" & "Test_File" & ".pdf")
End With
pdfJob.ReleaseCom
Set pdfjob = Nothing
Set printJob = Nothing
Doc.CloseDoc: QV.Quit
Greetings
David
Hello Community,
Update: i solved the problem myself The PDFCreator Documentation with the new COM Interface Settings was helpfull --> http://docs.pdfforge.org/pdfcreator/2.1/en/com-interface/reference/settings/
Here is my Code based on a VB-Script:
Dim QV, Doc
Set QV = CreateOject("QlikTech.QlikView")
WScript.Sleep 3000 'Wait 3 sec for qlik to open
Set Doc = QV.OpenDoc("C:\Users\********\Desktop\Test.qvw")
'Start PDF Creator Application
Set pdfJob = CreateObject("PDFCreator.JobQueue"): pdfJob.Initialize
'Print QV Report
Doc.PrintReport "Document\RP01", "PDFCreator"
With pdfJob
.WaitForJob (10) 'Wait max 10 Sec for the job
If .Count = 0 Then 'Quit if there is no job
.ReleaseCom: Doc.CloseDoc: QV.Quit
Set pdfjob = Nothing
Set printJob = Nothing
WScript.Echo "Error: There is nothing for me :("
WScript.Quit
End If
Set printJob = .NextJob
End With
With printJob
.SetProfileByGuid ("DefaultGuid")
.SetProfileSetting "OpenViewer", "False"
.SetProfileSetting "ShowProgress", "False"
.ConvertTo ("C:\Users\********\Desktop\" & "Test_File" & ".pdf")
End With
pdfJob.ReleaseCom
Set pdfjob = Nothing
Set printJob = Nothing
Doc.CloseDoc: QV.Quit
Greetings
David