Converting Email Body to Pdf

“I’m attempting to extract the content of an email’s body and convert it into a PDF file. Since Microsoft Word is not available on my system, I’m unable to use the Microsoft Word Scope. Can you provide some guidance on how to achieve this?”

There is a custom component on this

Cheers @Abhilash_Kodali

you can use send hokey amd give control p
select save as pdf and save with your required name

Getting this error:

Read saved email to PDF: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).

Need to convert using activities instead of hot keys and print option. As this might have higher failure chances

I think it’s because of Microsoft Office not installed on the machine where UiPath is running.
But I ms surprised that this component relies on Microsoft office @Abhilash_Kodali

I’m using Microsoft Office 365 scope to read the emails @Palaniyappan

Hi @Abhilash_Kodali ,
You can try this step
1.Get strBodyText = yourMailMessageVar.Body
2. use set clipboard to copy your pdf (eg: foxit, adobe,…etc)
4. send hot key ctrl+V to paste body to pdf file

Hello @Abhilash_Kodali

Certainly! In UiPath, you can extract the content of an email’s body and convert it into a PDF file without using Microsoft Word by following these steps

  1. Get Outlook Mail Messages (or Get IMAP Mail Messages)
  2. For Each email in MailMessages
  3. Get IMAP Mail Message (or Get Outlook Mail Message)
  4. Assign emailBody = email.Body
  5. Generate Data Table (format emailBody)
  6. Start Process (open HTML to PDF conversion website)
  7. Type Into (input HTML content)
  8. Click (convert to PDF button)
  9. Save PDF

If email body has images and images also should be included in PDF. Is that possible ?