cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a Macro From API

Highlighted
MEGA Partner

Calling a Macro From API

Dear Community,

 

 

I am trying to call a Macro from API.

 

I tried using the below but didn't succeed. Any advise?

 

 

mMacros = mI.MyRoot.GetCollection("Macro")

oMacro = mMacros.Item("AutomateMacroExecute")

oMacro.CallMethod("Execute")

 

 

Thank You

Mostafa

Tags (2)
1 REPLY
Occasional Contributor

Re: Calling a Macro From API

Hi Mostafa,

 

You can try this :

Set myTrigger = MegaEnv.GetMacro("myMacro")
myTrigger.myCommand myParam1, myParam2

with myMacro code is like :
Sub myCommand (myParam1, myParam2)
 ...
End Sub

 

Regards

Yannick