Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i am trying to create a pdf with a macro. I am using qv11 and wlikviewPDF.
the code should be alright cause Im not getting any errors but i can see the pdf on the desktop of my computer.
here is the code. can someone explain me what I am doing wrong?
sub report
ActiveDocument.clearall
path="C:\Users\p0862\Desktop\"
'path="D:\Qlikview\Report\"
ActiveDocument.PrintDocReport ("RP01"),"QlikViewPDF", false
set rep = ActiveDocument.GetReport("RP01")
reportFile = path & "versuch.pdf"
printReportPDF(reportFile)
ActiveDocument.GetApplication.Sleep 16000
End Sub
Function printReportPDF(pdfOutputFile)
Set WSHShell = CreateObject("WScript.Shell")
WSHShell.RegWrite "HKCU\Program Files (x86)\QlikView\QlikViewPDF\OutputFile", pdfOutputFile, "REG_SZ"
WSHShell.RegWrite "HKCU\Program Files (x86)\QlikView\QlikViewPDF\BypassSaveAs", "1", "REG_SZ"
Set WSHShell = nothing
End function
"HKCU\Program Files (x86)\QlikView\QlikViewPDF\OutputFile" is this link correct? cause I have it from the community and I dont know what I should really use here? and what is HKCU? and in my folder QlikViewPDF I cant see no file or folder that is named outputfile or bypasssaveas. I am new on creating a pdf thats why I have all this questions.
regards,
MT
please help I just dont know what I'm doing wrong?
Have a look here
i found some codes about creat pdf in vb.net for you:
Dim pdf As New RasterEdgePdfCreator()
Dim xml As New RasterEdgeXmlDocument()
Dim xslt As New RasterEdgeXmlDocument()
xml.Load(@"C/1.xml")
xslt.Load(@"C:/1.xslt")
doc.BindFO(xml, xslt)
doc.IsTruetypeFontMapCached = true
doc.TruetypeFontMapPath = (@"d:/pdf/")
doc.Save(@C:/"T.pdf", SaveType.OpenInAcrobat,Response)