Compare and Highlight text - word Document or PDF Document

Hello Creator,

@Jan_Brian_Despi @Palaniyappan @lakshman @balkishan @HareeshMR @sandeep13

I hope everyone knows that we can compare two word or PDF documents and we can say that whether any changes has been made or not ? Still i have a question . Is there any way to highlight the text or can make bold of changes text from document 1 to Document2.

Srenivasan Kannan

I haven’t done such this thing before but I think Quite Possiable

1)You can use HighLight Activity After we find word
Or second Option could be

  • Double click on Text and Pass Hot key Like Ctrl+ B to make Bold That text



Can you check if you have any activities available for highlighting the string @SrenivasanKanna

Just found the Key word highlighter package in the packages. Try using that, but I’m not sure that will help

1 Like

@sandeep13 @HareeshMR Thank you so much for your reply . I will try to figure out the solution.


1 Like

Would be very helpful if you could share the solution which worked for you and how you did it. I also have the same requirement.

Hey @BejoyEdison

Sorry for delay reply.

It’s simple logic i have used. while comparing both the word document .
original document - Make array of the all the words
Duplicate or modified document - Highlight entire document with yellow or any

Finally , just remove highlighted color for original document array key word .

after removing orginal highlighted content color , you will see the new content will be highlighted in color.

1 Like

Hey @SrenivasanKanna

Would you mind sharing your solution? I am working on a similar issue. Thanks a lot!

Thanks for sharing the solution that worked for you.

1 Like

Helllo Srenivasan,

I am trying to start a project on comparing 2 different Word Docs at the same time and for the bot to tell me what the differences are. Unfortunately I do not have the “Compare” activity option in my UiPath Studio X. So I was wondering what other possible activity can I use to start my project? ty! :slight_smile:

Try this logic, It may help you.

Assume You have two Document - Doc1 and Doc2

  • In Doc1 apply color to the entire text. e.g yellow — Use Send keys to apply colors on the Doc1

  • Doc2 — Read all the content and make it a new line format.

  • In the loop

     Take a new line
     Go to Doc1 
     Find the text line using hotkey -- Ctr+F
     Then remove the Selected line color 
     Do till your string is empty 

Finally Check out Doc1, If any content is highlighted in ‘yellow’ that the one different content or line.

happy automation…

   srenivasan kannan

Ok I’ll try that ty :slight_smile:

1 Like