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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Macro not sending PDF email

Hello Friends

We have a Dashboard wherein I have a VB Script macro which exports a report to PDF and emails to the users.

It works find when run manually.

When we trigger the application reload with the help of a Batch file (.bat file) it reloads the application successfully and also generates the PDF report in desired folder. However it does not sends the Email. (Have used OnPostReload --> Run Macro)

Batch File  -----> Reload the Application --> OnPostReload -- > RunMacro ---> Send PDF report email.

The above scenario runs well when we manually reload the dashboard. The email is sent successfully once macro is triggered after reload.

However the email is not sent when we reload the dashboard with batch file. Only the PDF is generated in given path.

Is there something we are missing to get the emails sent while relaoding the dashboard with batch file?

Kindly help to resolve above issue. Let me know if you need any further details.

Thanks & Regards

Chintan Gala

20 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Not not really. To send an email from inside a macro, I guess you call a method on a COM object. That method will return an error or a failure condition that you do not currenctly catch, otherwise the email would be sent without any problem. You should be able to retrieve that error.

Logs usually last a long time (especially those generated by the QlikView services) but since you automated this PDF generation using QV Desktop, a batch file and the Windows Task Scheduler, there won't be any default log files that document your operations. OTOH you may generate your own it that would be the easiest way to document error returns from macro functions.