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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

VB Script Issue in creating WScript.Shell Object

Hi,

i have downloaded a document regarding creating a PDF Report, In That there is Macro function which have below

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

Same i had copied the macro in my QV file as below

Function printReportPDF_NEW(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

But the downloaded document working fine , but in my document red marked line giving me error.

"ActiveX component can't create object: 'WScript.Shell' "

Kindly let me know why i am getting error in 1 document and not in other document.

Labels (1)
10 Replies
rwunderlich
MVP
MVP

I don't think the QlikviewPDF printer is a supported option any more.  You may want to try another PDF printer.  Also, I suggest opening a new thread here for this question as you may get more responses that way, perhaps from someone still using the QlikvewPDF printer. I don't have it.

-Rob