How to save outlook emails dynamically into PDFs

Hi,

I’ve created a sequence so far that gathers a list variable out of a certain email folder of all the emails it contains.

i then save these emails down as an .eml file using a counter variable to save them down sequentially.

once there saved down I’ve managed to get them open by using start process activity, but i’m stumped on the next part which is saving them down as PDFs to upload to our OCR software for data extraction.

Can someone help direct me on how to save .eml files down as pdfs,there is an option within the emails once open to ‘print’ them as a pdf. but i have no idea how to do this part. or if there is another activity that can do the same.

Thanks for your help.

J

Good morning Josh,

Does this UiPath Go component help?

Hi Chenderson,

I did try this from another topic that suggested it.

It works for the most part but the only part that didn’t make it suitable for me was it didn’t keep the email’s structured format.

For instance, in my case. i want to save the emails downs, convert them to pdf’s and keep the email body format untouch as these bodies contain a sales order. that is structured into a invoice format.

the reason i need to keep this format is because i want to insert it into our OCR software that can read its structured data to pull certain information from it.

Does you or anyone else might have any suggestions?

Thanks

Hi @JoshBurke,

You can use hotkeys and clicks to save that .eml file in pdf format.
But, for that you have to manually set printer type as —> Microsoft print to pdf.
to do the same, just open .eml file, press ctrl+p and set printer type as —> Microsoft print to pdf.

After this,

  1. Use Start Process activity and set the full path of .eml file to open it.
  2. Send Hotkey activity —> ctrl+p
  3. Click activity to click on print button.
  4. type into to save the file on particular location with specified name.
  5. Click activity to click on save.

Note: You can set the printer as Microsoft print to pdf in sequence to using click.

Hi @samir

This has almost got me there. but i’m getting stuck on one part.

Because i’m doing this in a For Each loop, its opening multiple emails at once. now i’ve gotten start process to open both of my seperate test emails. but when i used the send hotkey activity. its only applying the hotkey to the second email. even though the hotkey activity is included within the for each loop.

Any ideas?

Thanks