Microsoft Word an c#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • djamila

    Microsoft Word an c#

    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.R eport(). System.AccessVi olation 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.
  • Ignacio Machin ( .NET/ C# MVP )

    #2
    Re: Microsoft Word an c#

    On May 23, 9:19 am, djamila <djamilabou...@ gmail.comwrote:
    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.R eport(). System.AccessVi olation 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

    Comment

    • harborsparrow

      #3
      Re: Microsoft Word an c#

      On May 23, 2:35 pm, "Ignacio Machin ( .NET/ C# MVP )"
      <ignacio.mac... @gmail.comwrote :
      On May 23, 9:19 am, djamila <djamilabou...@ gmail.comwrote:
      >
      >
      >
      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.R eport(). System.AccessVi olation 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
      You have hit upon the very pitfall of manipulating Office from within
      code: Microsoft does not guarantee backwards OR forwards compatibility
      for Office.

      Comment

      Working...