Failed to load file or assembly "Microsoft.Office.Interop.Word, Version = 12.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c"

I am trying to convert a docx file to pdf and I managed to convert the PDF to local.

The steps I followed in visual studio 2010make up

click on Add reference --> Click to COM -->select "Microsoft Word 12.0 Object Library" and cliked ok

My web configuration changed and assembly added

<add assembly="Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>

My .cs code to convert a document to pdf is

using Microsoft.Office.Interop.Word;//Name Space


protected void Page_Load(object sender, EventArgs e)//Coading on page load
{

    Microsoft.Office.Interop.Word.Application appWord = new Microsoft.Office.Interop.Word.Application();
    wordDocument = appWord.Documents.Open(Server.MapPath("~/convert/goodquest.docx"));
    wordDocument.ExportAsFixedFormat(Server.MapPath("~/convert/goodquest.pdf"), WdExportFormat.wdExportFormatPDF);
}

public Microsoft.Office.Interop.Word.Document wordDocument { get; set; }

Everything works fine in local, but when I uploaddo it all changes to web.

Error for example

Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

. How to solve this problem?

"Microsoft Office 2010: , " , "Version = 12.0.0.0" "to" Version = 14.0.0.0 ", , , " " " → "Click to COM........"

+2
4

Microsoft.Office.Interop.Word.dll bin .

%ProgramFiles%\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\ , : . MSDN

else, DLL: fooobar.com/questions/1646024/...

+3

DLL (Microsoft.Office.Interop.Word) ?

DLL , Microsoft.

, , .

DLL GAC else . , , .

0

dell.

dll.

0

Word #:

  • Word Interop Library (Assembly)
  • Excel using
  • .


, Office (Word). , . Microsoft.Office.Interop.Word .

. , Office with Word. .

. Microsoft.Office.Interop Office 2013 . , COM Microsoft Word {version-no} Object Library. .

. Microsoft.Office.Interop... - THEN, .



: using Word=Microsoft.Office.Interop.Word;



, , Word Word.Application wApp = new Word.Application();.

0

All Articles