Format a string in a word document

Hello,

I would like to ask what are some methods to format my word document using UiPath. I’m using the word activities pack but I need the option to change the color of my text, bold some word in some of the sentences, and change the font and its size.

image

Hi @Joshua_Salazar,

If you know about macros a little or if you can at least record a macro. You can inject VBA code or just run a macro and have the results you’re looking for.
image
image

1 Like

Hi @Joshua_Salazar,
One of the method to achieve it is to just operate withing Word application scope and use some Click activities to set particular options.

Thank you for your response. I tried using click activities and hotkeys on specific texts, however it could not click on any element except the whole word file

Which version of MS Word do you have?

I was using MS Word 2019 version. The problem was I can’t click on any object. It’s highlighting the whole word file. I was able to address this issue by invoking a macro instead. Thank you

2 Likes

Hmmm 2019, it seems that it just can’t properly see your selectors in MS Word. Please try to use newest version of UiAutomation package.