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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

windows 7 macro problem

Hi,

There are five years I use a macro to print iterated pdf in my applications...now in my office is come a Windows 7 machine and the macro isn't able to run...

here the code:

function printReportPDF_Alone(NomeReport, pdfOutputFile)

     Set WSHShell = CreateObject("WScript.Shell")

      WSHShell.RegWrite "HKCU\Software\QlikViewPDF\OutputFile", pdfOutputFile, "REG_SZ"

      WSHShell.RegWrite "HKCU\Software\QlikViewPDF\BypassSaveAs", "1", "REG_SZ"

    'QV Print

     ActiveDocument.GetApplication.Sleep 4000

    'msgbox NomeReport

     ActiveDocument.PrintReport NomeReport , "QlikViewPDF", false

      ActiveDocument.GetApplication.Sleep 4000

      WSHShell.RegWrite "HKCU\Software\QlikViewPDF\OutputFile", "", "REG_SZ"

     WSHShell.RegWrite "HKCU\Software\QlikViewPDF\BypassSaveAs", "0", "REG_SZ"

     set WSHShell = nothing

end function

I think the problem is that Windows 7 has a restricted access to registry keys and my user isn't able to read/write the keys....

I need this macro because of I need to print several pdf in an automated way...can anyone help me rewriting this code to work also in Windows 7?

Thank you.

Matteo

1 Reply
hopkinsc
Partner - Specialist III
Partner - Specialist III

Hi, did you ever get a resolution to this? i have the same problem.