Error when trying to open Word doc in Windows Forms

May 14 2009 4:48 PM

I get the following error when I attempt to open a word doc in windows forms using this command:

wrdDoc = wrdApp.Documents.Open(ref oFileName, ref oMissing, ref otrueValue,
                ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
                ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
                ref oMissing, ref oMissing, ref oMissing);

The error msg is: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

 I am using VS 2008 SP1. .net framework 3.5 sp1 coding in c#

I am using word 2000 sp 3. and have the following using statements:

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

 This works on my home PC but I get the error when developing on the work PC.

 Am I missing some "rights" to be able to open word docs, etc. or . . . ?

 Thanks in advance.

 Jay

Answers (1)