Domanda

I want to print Outlook .msg files to PDF programatically. Since I cannot set ActivePrinter using C# AddIn in Outlook, I am searching if there is any way to use PDFCreator.

I found, that you can call PDFCreator with /PF<filename> option, and it will print specified file to PDF using its default launcher. So I tried this on .msg file, it prints them perfectly, but user must interact with PDFCreator GUI to choose save location and some other stuff...

So, is there any way, command or script I can use to convert .msg file to PDF using PDFCreator programatically, without user input at all?

È stato utile?

Soluzione

PDFCreator implements COM object, which you can use. And it (pdfcreator) ships with examples of usage, including VB and C# examples.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top