please any one help to me,
my problem is in word document some word in bold format and deferent style,
when i get this text in string variable then in not come in original format. it shows plane text.
how to solve this problem?
𝐓𝐡𝐢𝐬 is 𝐃𝐨𝐠 — original text
This is a Dog – in message box result
please help me
What method are you using to extract the text
i have downloaded word package. and used read text file.
When you retrieve text from a Word document into a string variable, the formatting information isn’t directly preserved in the string variable because a plain string variable can’t store formatting information.
You can use copy and paste directly from a formatted Word document to preserve the format.
May i know the use case? What are trying to do?
my use case is i have template in word. which is in paragraph.
adding some condition in want to mail paragraph condition wise.
1=“Vinayak” then send this paragraph on mail…
but when i send email, then text is plane not bold and other style
Use a Word file with HTML tags as the input for the email body which will preserve the formatting in UiPath:
Read Word File:
Utilize the “Read Text File” or “Read Word File” activity to read the content of your Word file into a variable.
Choose an email activity (e.g., “Send Outlook Mail Message”).
Set the variable containing Word file content as the body of the email.
Ensure the email activity supports HTML formatting, and set the IsBodyHtml property to True.
For ref: How to insert HTML code to UIpath SMTP send mail body
Hope this helps:)
Try updating the UiPath.Word.Activites to latest version because for me the output of Read Text activity preserves the formatting
Thanks for replay, it doesn’t work in my machine. my current version is 1.18.1
can you please share your version of word.
It is the same for me. Since you’re using it as a template, you can also go with storing the content in HTML format and use it to as a mail body. It will surely get your desired formatting.