question

SivaMani-0897 avatar image
0 Votes"
SivaMani-0897 asked DanielZhang-MSFT commented

C# Export Email to PDF EWS API

I am using EWS API 2.0. I wanted to download the entire email as a PDF file. I had used an approach to download the email body using the Chrome Print option. Any similar approach in this case? Please help!

dotnet-csharp
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SivaMani-0897,
Maybe you can refer to the method mentioned here.
Best Regards,
Daniel Zhang


1 Vote 1 ·

Thanks for the response. This helps to convert the email body to PDF.

How can I do it for the entire email(include subject, from and to)?

the requirement is to achieve Save As PDF option in the Outlook app using C#. Any help on this?

0 Votes 0 ·

1 Answer

DanielZhang-MSFT avatar image
1 Vote"
DanielZhang-MSFT answered DanielZhang-MSFT commented

Hi SivaMani-0897,
First of all, there is no built-in function in Outlook to change emails to pdf format. You need to use some related add-ins or VBA code to convert emails to pdf files.
And VBA macros use the functions of Word to save documents in pdf format.
One benefit of this macro is that any hyperlinks in the message will continue to work, and any Internet images will also be automatically downloaded.
So I suggest you try to use VBA macros.
I also found some related links you can refer to.
Saving Outlook email as PDF + Attachments
VBA Macro in Outlook
Convert MSG email to PDF file in C#
Best Regards,
Daniel Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It sounds correct solution for me. I will give it a try. Thanks for the guidance, Daniel! Appreciate your help.

0 Votes 0 ·

Hi @SivaMani-0897,
May I know whether your issue has been solved or not? If not, please share it in here. We can work together to figure it out.Best Regards,
Best Regards,
Daniel Zhang

0 Votes 0 ·