Microsoft Word an c#

D

djamila

Hi,

I work in a c# project that uses Microsoft Word to generate report. In
my program I use Interop.Word reference.

When I run the program in my PC with Microsoft Word 2003, all work
well. But when I execute the program in another PC with Microsoft word
2002, I had the following exception:
Error in frmDataReview.Report(). System.AccessViolation Exception:
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
I installed Microsoft Word 2003 in this PC, the program run without
any error.

My question is : How can I generate Word document in my c# project
that works with any version of Microsoft World ?

Best regards,

Djamila Bouzid.
 
I

Ignacio Machin ( .NET/ C# MVP )

Hi,

I work in a c# project that uses Microsoft Word to generate report. In
my program I use Interop.Word reference.

When I run the program in my PC with Microsoft Word 2003, all work
well. But when I execute the program in another PC with Microsoft word
2002, I had the following exception:
Error in frmDataReview.Report(). System.AccessViolation Exception:
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
I installed Microsoft Word 2003 in this PC, the program run without
any error.

My question is : How can I generate Word document in my c# project
that works with any version of Microsoft World ?

Best regards,

Djamila Bouzid.

Hi,

Most be that you are using something available to 2003 and not to
2002, you better check the docs of the API
 
H

harborsparrow

Hi,

Most be that you are using something available to 2003 and not to
2002, you better check the docs of the API

You have hit upon the very pitfall of manipulating Office from within
code: Microsoft does not guarantee backwards OR forwards compatibility
for Office.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top