How to read a macro enabled word document?

Hi,

I am using WordApplicationScope activity. However, I am unable to read from a macro-enabled word document.

I saw a post which has been asked 2 years ago. The post is also about this question.

This is the post link: How to read the text from a macro enabled word document?

Thus, I am curious if now there is a way to read a macro-enabled word document from WordApplicationScope activity?

Thank you

2 Likes

@Ying_Zhen_Lee

Might it helps you

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 normal.dot 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

Hi @ksrinu070184,

Thanks for your reply and help!

I have placed the macro under the normal directory.
Thus now I do not need to save my document as a macro-enabled document, as any word document will be able to use the macro

Thank you :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.