Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

run a macro after reload

hi all,

I have a macro that emails out a QV report. the macro runs fine if i run it manually from the desktop client but i need a way to run it automatically after a reload has finished.

On post reload doesnt work for this, does anyone have any suggestions please?

I don't mind if its a windows scheduled task that runs at a specific time, i just don't know how to get a script to open the QV doc and run the macro.

Thanks

5 Replies
m_woolf
Master II
Master II

You will need to set up an external task and reload the qvw with a batch file.

Run a macro on post reload

vikasmahajan

On Post Reaload you can run the macro.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
ashfaq_haseeb
Champion III
Champion III

Hi,

Check this

http://community.qlik.com/thread/15988

regards

ASHFAQ

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

thanks for the replies so far.

my client does not have publisher which is why i had to use a macro to create and email the report.

i know have a batch file that reloads the qvw and runs the macro (as a result of the on post reload trigger).

the problem i am getting now is that the macro doesnt finish running. it creates the report and saves it in the correct location but nothing is done after it (so nothing is emailed out) and the cmd window hangs.

it works perfectly if i open up the qvw and manually reload but i need this to be automated.

m_woolf
Master II
Master II

The cmd window probably hangs because the macro doesn't quit the application.

ActiveDocument.save     

Activedocument.Getapplication.quit

When this is working in the client, what causes the emails to be sent?