Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditioning a run macro

Hi,

for a selection I need to condition the related run macro action. I have tried to use the IF statement in the macro name but unsuccessfully.

Is it possible to condition the running of a macro?

Thanks

3 Replies
Not applicable
Author

Hi,

can you upload your QV file....

erichshiino
Partner - Master
Partner - Master

I don't think you can create a condition to execute a macro. but you can include a condition in the beggining of the macro to execute part of your code or not.

Please, send us some sample app and describe what you need so we can think about something.

(Sometimes we can make it just with the description)

colinh
Partner - Creator II
Partner - Creator II

You can make a macro run depending on the value of a variable. Something like:



sub MacroName
set p = ActiveDocument.Variables("vVariable1")
if p.GetContent.String <> "0" then
...
end sub


Trigger the macro on change of a field or on change of the variable value, and it should do what you want.