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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
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.

10 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/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