Can i highlight the specific text in UiPath?if yes how can i do that?
You can use create html content and for Pan you can add color
And use the output of this in the body of mail and make sure to check isbodyhtml option in mail activities
Hope this helps
cheers
User said that they want PAN no should be highlighted in the mail body…So they said that whenever bot is sending mail in that mail body PAN:JECPS**** this should be highlighted from PAN to NO…How can i do that?
But there are multiple mail’s with different different PAN no…How can i do that?
And i have extracted all this text from pdf and then i have converted that extracted text into txt file and then iam appending that txt file in a mail body…In that text there are different different PAN no:
In create html content activity you can pass in variables as well…so assign the pan number to variable and create the content as the variable value changes the value of pan would change but highlight would still remain
Or if you want to dynamically do it from a different text then replace the pan number with html tags and pan number so that it would get highlighted
str.Replace("Pan Number","<FONT style="BACKGROUND-COLOR: #0000ff" color=#ffffff>PAN Number </FONT>")
Here you can include number as well
Hope this helps
cheers
hello @Priyesh_Shetty1
At first Get the pan numbers a Side meance find all pan providing some regex activity.
then pass them in HTML coding. you can do for each pan and provide html coding like
This text will be red.
if you want anything in regular and pan only in red then tryYour regular text
This text will be red.
provide proper spacing and pass this html by assigning in start and taggs at end in email body. if you want more clarification let me know.
hope this solves your issue.
Bro i didnt get you
in bracket different diffetent PAN number is written
You can do that here as well…you either need to create a static content and use create html content activity
or you need to follow the second approach given above
Here you need to find the (PAN: Number) from the text and then replace it with html so that the pan would be highlighted
cheers
But is this code will highlight all PAN:JECP****** in the mail body?
What even you replace will highlight all…
Eg: say your text is ‘I Have a PAN Number and it is PAN:23456789’ then say it is stored in str.
To find pan you can sue regex PANvar = System.Text.RegularExpressions.Regex.Match(str,"(?<=PAN:)\w*").Value
then you need to write str.Replace("PAN:" + PANVar,"<FONT style="BACKGROUND-COLOR: #0000ff" color=#ffffff>PAN:" + PANVar+" </FONT>")
cheers
is this a wrong code?
Can you please provide that exact code how should i do that?
It dosent worked