Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Macro Print PDF fails when turns in 64 bit computer

Hey guy, recently I've made a macro to print pdf reports with Bullzip.

I've ben executing the macro in QV 10 wiith 32 bit and windows XP. Everything was fine.

Now, I'm working in QV 10 64 bit in Windows 7 and I can't make it work.

Here you have the function that prints the pdf :

//prints the pdf with the bullzip printer


FUNCTION MyPrintPDFWithBullZip (pdfOutputFile)
set obj = CreateObject("Bullzip.PDFPrinterSettings")
obj.SetValue "Output" , pdfOutputFile
obj.SetValue "ConfirmOverwrite", "no"
obj.SetValue "ShowSaveAS", "never"
obj.SetValue "ShowSettings", "never"
obj.SetValue "ShowPDF", "no"
obj.SetValue "RememberLastFileName", "no"
obj.SetValue "RememberLastFolderName", "no"
obj.SetValue "ShowProgressFinished", "no"
obj.SetValue "ShowProgress", "no"
obj.WriteSettings True
END FUNCTION

And my error is :

ActiveX component can't create object: 'Bullzip.PDFPrinterSettings'

Any help or ideas would be appreciated.

Regards!!

16 Replies
tseebach
Luminary Alumni
Luminary Alumni

Make sure you have set Allow System Access in the macro module

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks Torben for your interest.

In fact, this is the first thing I usually do when I have a problem with a macro.

I found the solution and it was posted here :

http://community.qlik.com/forums/t/16003.aspx?PageIndex=2

Many thanks anyway!!

Cheers!

tduarte
Partner - Creator II
Partner - Creator II

Hi Marcel,

I'm having problems running the create pfd marcro on Windows Server 2008 but the link you posted no longer exists.

Could you share the solution?

Thanks.

marcel.olmo1 wrote:

Thanks Torben for your interest.

In fact, this is the first thing I usually do when I have a problem with a macro.

I found the solution and it was posted here :

http://community.qlik.com/forums/t/16003.aspx?PageIndex=2

Many thanks anyway!!

Cheers!

bm59
Contributor III
Contributor III

Hi,

I have the same problem on 64bits, the link is broken, can you explain the trick to figure out ?

Thx

Not applicable

Hi BM59

I have the same problem, I can run the Macro with QV 32bits but when I try made same Macro in QV 64 bits is when apppear this same error.

If you found the solution for this problem, Can you help me? =l

Thanks

bm59
Contributor III
Contributor III

Hi Hugo,

In the MyPrintPDFWithBullZip fonction.

Replace:

set obj = CreateObject("Bullzip.PDFPrinterSettings")
By:

set obj = CreateObject("Bullzip.PdfSettings")

work for me

Not applicable

Hi

First thanks for your help 😃

I used this CreateObject("Bullzip.PdfSettings")  this working,  I mean is not appear the message ActiveX component can't create object:

But...Now appear this messager:

The PrinterName property must be set before calling the GetSettingsFilePath method. Please If you have time, can you help me?

Sub pagos
' ActiveDocument.reload
vReport = "RP01" 'Set report
vName = "Pagos" 'Name of output pdf
ActiveDocument.PrintReport(vReport), "Bullzip PDF Printer", false 'Printreport
reportFile = "C:\" & vName &".pdf" 'Setting outputname
MyPrintPDFWithBullZip(reportFile) 'Call pdf printer
ActiveDocument.GetApplication.Sleep 5000
' mailrapport
' ActiveDocument.S
ActiveDocument.GetApplication.Sleep 5000
ActiveDocument.GetApplication.Quit
End sub

FUNCTION MyPrintPDFWithBullZip (pdfOutputFile)

set obj = CreateObject("Bullzip.PdfSettings")
obj.SetValue "Output" , pdfOutputFile
obj.SetValue "ConfirmOverwrite", "no"
obj.SetValue "ShowSaveAS", "never"
obj.SetValue "ShowSettings", "never"
obj.SetValue "ShowPDF", "no"
obj.SetValue "RememberLastFileName", "no"
obj.SetValue "RememberLastFolderName", "no"
obj.SetValue "ShowProgressFinished", "no"
obj.SetValue "ShowProgress", "no"
obj.WriteSettings True

END FUNCTION

Not applicable

Hi,

Try this

it worked for me

FUNCTION MyPrintPDFWithBullZip (pdfOutputFile)

  Set obj_printer_util = CreateObject("Bullzip.PDFUtil")

  printername = obj_printer_util.defaultprintername

  set obj = CreateObject("Bullzip.PdfSettings")

  obj.printername = obj_printer_util.defaultprintername

  obj.SetValue "Output" , pdfOutputFile

  obj.SetValue "ConfirmOverwrite", "no"

  obj.SetValue "ShowSaveAS", "never"

  obj.SetValue "ShowSettings", "never"

  obj.SetValue "ShowPDF", "no"

  obj.SetValue "RememberLastFileName", "no"

  obj.SetValue "RememberLastFolderName", "no"

  obj.SetValue "ShowProgressFinished", "no"

  obj.SetValue "ShowProgress", "no"

  obj.WriteSettings True

END FUNCTION

bm59
Contributor III
Contributor III

it's ok for you, now?