"Attempted to read or write protected memory" while opening word document
Hi,
I have a small c# application that opens a word document and get all the content from it, then loads it in the clipboard. It works perfectly on my development machine, however, when I move it to the end-user computer at my job, this message shows up:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack trace:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Microsoft.Office.Interop.Word.Documents.Open(..)
Below is my code. At first I thought it would be document's permission, however, I have full permission to both documents and it's in the root of my C drive.
I doubt it is related to my word version... I use Microsoft Word 11.0 Object Library, and I have word 2003 on my development machine, while word 2002 is on the end-user machine..
I included all the required dll in my application's main directory, no change. The same framework is on both machine.
Finally I downloaded office xp pia and added as a reference and it worked, thanks ^^
.NET Programming
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
ASKER
Is there any place I can download it and replace Word 11.0?