Page tree
Skip to end of metadata
Go to start of metadata

It is possible to invoke Visual Basic scripts through the COM interface from other languages like Python or Powershell. There are a few limitations to this:

  • You can only call the 'Main' subroutine in an object module

  • You cannot pass arguments to the subroutine

Invoking the Main subroutine in the Module1 module in a project from Python would be done like this:

 import win32com.client
     awrde_com_obj = win32com.client.Dispatch("MWOApp.MWOffice")
     awrde_com_obj.Project.ProjectScripts.Item("Module1").Routines.Item("Main").Run()