Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Run macros in QMC

HI Guys,

I've got a problem when i run my  QV model manually on a server it runs and send me an email with an attachment Via Macros,

but when i use QMC it dosen't send and email and it dosen't give me any problems with the macros.

* i did allowed Macro execution on a server together with unsafe macros

so im not sure on how to tackle this??

Urgent help will be beneficial.

Thanks.

13 Replies
jerrysvensson
Partner - Specialist II
Partner - Specialist II

QMC will not run macros.

petter
Partner - Champion III
Partner - Champion III

You can send e-mails from a load script by various mechanisms. Using PowerShell (part of any Windows installation) can allow you to use the PowerShell Send-MailMessage command. This has to be invoked from the load script with a load script statment called EXECUTE.

However the right version of PowerShell has to be installed on the server and the Windows administrators has to allow the account which is running the load script to execute PowerShell. This should be possible to accomplish as it doesn't introduce new software but of course the security policy has to be taken into account.

andrespa
Specialist
Specialist

Hi Thabiso,

You just can run macros if you're using the IE Plugin. Probably you're using Ajax and that's why the macro won't launch.

Cheers,

Andrés

Not applicable
Author

Hi Andres,

My Macro runs fine, when running manual reload, but when i deploy it and schedule to QMC and run immediately thats when i can't get the answer im looking for.

Manually: i receive an email with an attachment

on Deployment: model runs but no email.

do i have to enable something in order for my macro to process the step.

Thanks.

magavi_framsteg
Partner - Creator III
Partner - Creator III

Another way, unless you want to do as Petter suggests is to make use of Publisher External Tasks:

- Create a batch file

- In said file, issue %PATH-TO-QV.exe%\qv.exe /r path-to-qvw-doc.qvw

- Create an external task in QMC > System > External Task

- OnPostReload macros gets triggered if qv.exe does the reload, NOT if qvb does the reload.

Not applicable
Author

Hi Magnus,

seems you understand what i want to do, can you please send a sample screenshot on all theses steps?

as im not so sure on how to tackle this.

Thanks.

Anonymous
Not applicable
Author

HI Guys,

im still having the problem with sending an email to with an attachment.

Thanks.

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Didn't Magnus solution work?

Not applicable
Author

HI Jerry,

how do i get to Publisher External Tasks?

not so sure about that, if its a Qlikview Publisher one, then i don't have.

Thanks.