none
Error while converting word to pdf using Microsoft office 2013 standard edition RRS feed

  • Question

  • Hi,

    We are trying to convert word document to PDF and able to do the same on staging server with Microsoft office 2007 professional setup using
    Hide   Copy Code
    ExportAsFixedFormat
    method from
    Hide   Copy Code
    Microsoft.Office.Interop.Word.Document 
    from below code :

    Hide   Copy Code
    wordDocument.ExportAsFixedFormat(paramExportFilePath,
                                paramExportFormat, paramOpenAfterExport,
                                paramExportOptimizeFor, paramExportRange, paramStartPage,
                                paramEndPage, paramExportItem, paramIncludeDocProps,
                                paramKeepIRM, paramCreateBookmarks, paramDocStructureTags,
                                paramBitmapMissingFonts, paramUseISO19005_1,
                                ref paramMissing);


    However it is not working on production server with Microsoft Office 2013 standard edition and gives below error upon running from IIS :

    Hide   Copy Code
    Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).


    I am not sure if this is due to office setup difference or we need to add any add-in ?

    We have tried giving rights to DCOM config as well.

    Please assist.


    Thanks in advance.
    Tuesday, May 29, 2018 6:09 PM