You cannot run VBA macros created in Microsoft Word in MyText. But you can view the code of the VBA macros contained in the document and rewrite them in Lua language.
VBA macros saved in the current Microsoft Word document are available for viewing.
To view and rewrite the VBA macro code, follow these steps:
1.Open the .docm document.
2.Select the Lua macro with the name of the VBA module that contains the required VBA macro. For example, if the VBA macro Macro1 is contained in the VBA module Module1, select the Lua macro Module1. To select a Lua macro, do one of the following:
•On the Macros tab, click
Macro editor. When working in macOS, you can also run the Tools > Macro editor command from the command menu. In the Macro editor window, select the required Lua macro.
•On the Sidebar, click
Macros. In the Macros pane, hover the mouse cursor over the name of the required Lua macro and click
More. In the drop-down list, select Edit.
3.The Macro editor window will display the code of the VBA macros that are contained in the corresponding VBA module. Rewrite the code of the required VBA macro in the Lua language.
4.Close the Macro editor window.
5.Save the document in .docx format using the Save as command.
Changes made are not saved in the original .docm document.