Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script for Exporting and Sending email

Hi Everybody,

Please help me the script to export the Qlikview documents into Excell/PDF file and the script to send email in Qlikview environment.

Many thanks,

Tai.

85 Replies
navaskhan
Contributor III
Contributor III

How to modify the code to work for some other PDF Printer?

jkampmeijer
Contributor II
Contributor II

Thanks for the mail script.

Works for me!

rendiyan
Partner - Creator
Partner - Creator

Hi JochenAndries

Thx before for your great script!

I'm using Windows 7 64 bit, and QlikView 11 64bit.

I tried your script for export to pdf, exporting was fine.

But the setting in the script has no effect.

It print as : "QlikView Printing.pdf"

it stored to Desktop, and i have to set the printing properties manually.

Also when i open the file, it needs to set the Bullzip manually.

I've insert the screenshot below :

So, the script only work until opening the bullzip pdf printer, and the rest i have to set it manually.

Do you have any idea why is this happenning?

Thx a lot before

Not applicable
Author

First of all:

The two security choices on the left side, are they set on 'SYSTEM' ?

rendiyan
Partner - Creator
Partner - Creator

Hi Jochen,

Yes, it set to 'System Access' and 'Allow System Security'

Bullzip version i use is version 10.21.2462

rendiyan
Partner - Creator
Partner - Creator

Hi Jochen,

I've solved it.

I edited your script to :

Sub zendrapport 
    ActiveDocument.reload 
    vReport = "RP01" 'Set report 
    vName = "RP01" 'Name of output pdf 
    ActiveDocument.PrintReport(vReport), "Bullzip PDF Printer", false  'Printreport 
    reportFile = "E:\TestMacroPDF\" & vName &".pdf" 'Setting outputname 
    MyPrintPDFWithBullZip(reportFile) 'Call pdf printer 
    ActiveDocument.GetApplication.Sleep 5000 
    'mailrapport   
    ActiveDocument.Save 
    '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  

Thx