Office "12" supports "Save As PDF" programmatically

As a developer, I was quite excited to learn that Office "12" will allow you to save documents as PDF/XPS. Since that moment, I have been quite surprised to see excitement around that feature. I am now happy to learn more about XPS. You should read Jeff Bell's blog and Andy Simonds's blog to learn more about this.

For those of you who have been asking through my blog and email if this functionality (Save As PDF) is going to be exposed in the API the answer is YES! Office PIAs will have methods that expose this functionality. The details and sample code will be available after we ship Beta 2.

Comments (5)

  1. Chris Hedlund says:

    When are you shipping Beta 2?

  2. Hi Chris,

    The official date has not been released. However, I can tell you it’s coming soon.

  3. Sanket says:

    Hi Erika,

    I just want to ask you about the API for Save As PDF in Office 12… is it released with office 12 Beta 2 TR or will be there in final release?..

    you response is highly awaited.

    thanks & regards,

    Sanket K Mistry,

    Software Engineer,

    Decos Software Developement Pvt. Ltd.,India

  4. Joe says:


    This blog post is the best source of information about programmatically saving Word docs as PDF files.  I am attempting to leverage this feature and have run into a roadblock and cannot find documentation on this, so I hope you can help point me to it or the answer!

    When I set object FileFormat = Word.WdSaveFormat.wdFormatPDF (as a valid enum type through VS2005), the Document.SaveAs() function throws a COM exception of "Command Failed."  When choosing any of the built-in file types, files are saved correctly.  This is, obviously, with the PDF add-in installed.

    Thanks in advance!

  5. Hannah says:

    Hi Erika:

    Just to say ‘I second that’ for Joe’s post above – your blog post seems to be the only definitive source about programmatic Word to PDF saving.

    We have also run into a roadblock and cannot find the documentation on this functionaliy. I would very much appreciate any point in the right direction.

    Use of this functionality would save a small fortune in licensing of third party products and provide improved functionality on our web application.

    Thankyou in advance,


    Software Developer

    Provoke Solutions Ltd.

Skip to main content