Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi, did you ever get a resolution to this? i have the same problem.