cancel
Showing results for 
Search instead for 
Did you mean: 

VB Macro Call Using Java API Invoke function throwing error

Highlighted
Contributor

VB Macro Call Using Java API Invoke function throwing error

We have a requirement to call VB macro from Java code

I am using following code to invoke a function "printme" inside a macro named myTestMacro

 

MegaObject myMacroObj=mgRoot.getObjectFromID("~kJbFxI4oO5EN");// to get myTestMacro
if (myMacroObj != null && myMacroObj.exists()){
MegaCOMObject thisMacroFromRoot =(MegaCOMObject)mgEnvironment.getMacro(myMacroObj.getProp("~210000000900[Name]"));
thisMacroFromRoot.invokeFunction("printme");

 

I am getting following error :

 

Exception in thread "main" MEGA Error 0x80020101
at com.mega.modeling.api.jni.MappModuleJNI.InvokeFunction(Native Method)
at com.mega.modeling.api.jni.ComObjectProxy.invokeFunction(Unknown Source)

 

Can some one help me what am I missing here. Thanks in advance.

Tags (2)
1 REPLY
Contributor

Re: VB Macro Call Using Java API Invoke function throwing error

Can some one please give some insight ?