How to call corel macros from Visual Studio (Visual Basic).

Call corelApp.GMSManager.RunMacro("GlobalMacros", "RecordedMacros.MyMacros", args2) returns error "Macro module not found", but it exists. Here is sample:
Dim corelApp As CorelDRAW.Application
corelApp = New CorelDRAW.Application
Dim args2 As Object = New Object
args2 = ""
corelApp.GMSManager.RunMacro("GlobalMacros", "RecordedMacros.MyMacros", args2)

and after that it returns error.

Parents
  • First, initialize VBA corelApp.InitializeVBA() Second, if your macro does not receive parameters, do not pass parameters, because parameters are also part of the method signature. Test() != Teste(String m)
    corelApp.GMSManager.RunMacro("GlobalMacros", "RecordedMacros.MyMacros")

Reply Children
No Data