How To Change formatting of Words in Word Documents

Dears,

How To Change formatting of Words in Word Documents ?
First need to count the total number of word occurence and than change inside the document the format of this word : Color, font, …etc. Thanks

1 Like

Hey @hsendel

VBA or Microsoft Interop library would be a go to option for this !

Thanks
#nK

1 Like

Thanks Nithinkrishna, I will check that.

1 Like

Okay cool @hsendel

Feel free to post if you face any difficulties.

1 Like

Thanks @Nithinkrishna , not possible to be done though Uipath Activities only ?

1 Like

Hey @hsendel

Finding duplicate words is possible but coming to formatting I don’t think so as of now with available activities !

Thanks
#nK

YES, this is the trick, how to find the number of word occurrence ? than I can do the rest with recording activities using while activity to go through all the items.

1 Like

Hey @hsendel

You mean to say you will use UI Automation?

Thanks
#nK

1 Like

Excat!!! Check my previous message I have made some changes on it

1 Like

To count the word appearence , I founf the following RegEx formula : system.Text.RegularExpressions.Regex.Matches(inputText,“Word”).Count
Let me check the rest

1 Like

Okay @hsendel Sure. Let us know.

But just to suggest, my go to option will not be Ui-Automation but still if that’s going to give you accurate results then its fine !

1 Like

If you can share how to do this using : VBA or Microsoft Interop library as suggested it will be fine .

1 Like

Okay @hsendel Sure.

If something is not find with the Existing UI method which you made we can surely work on the alternate part…

1 Like

Hello @hsendel ,

Check whether the below post can help you.

1 Like