Call Word Macro using Ui Path



We have a scenario where we need to delete rows of a table dynamically in a word file. We have the macro query for it and is working fine when run in the word file.
But we need to run this query via UI Path. We did not find any activity in UI Path Studio related to Word macro.

Can you please help us on the same.


Not sure if you still have this problem, but thought I’d answer if you do. Unlike excel, there is no automatic Execute Macro function in uipath (Visual basic has it, but so far not uipath). So what I did was a combination of hotkeys.

First on the machine running the robot you need to have your macro installed under the function.
To do this, open VBA under word and do an import file placing the macro under the normal directory. This allows the macro to be available to any word application running on that PC

In uipath in the word application scope:
‘send hotkey’ of ALT-F8 (this opens the macro window)
‘Run Select item ‘list’’ with your macro name

Do a Click ‘push button’ to run OK

This worked for me better then trying to work my way through the Word menu system.