Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview and running external macro (word/excel)

Hello,

I'm currently working on Qlikview 9, and in a qlikview macro, I manage word application. At a certain moment, I execute a macro written in the word document. It works fine, by using this :

Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Open("myWorddoc.doc"')

objWord.Application.run "myexternamacro"

BUT now I try to pass a parameter to the word macro like this :

objWord.Application.run "myexternamacro","myparam1"

It works the macro is executed, the parameter is taken over in the word macro, but the Qlikview macro stops at the current line (without any error message), and the code which follows is not executed

Have you an idea ?

1 Reply
Not applicable
Author

Solved.

Just by adding the command 'On error resume next' before, like this:

onerror resume Next

objWord.Application.run "myexternamacro","myparam1"