Attempted to read or write protected memory.....

Discussion in 'ASP .Net' started by =?Utf-8?B?QmFkaXM=?=, Apr 23, 2007.

  1. Hi,

    I'm using automation to produce word documents, and it's working fine in my
    machine that have vs.net 2005 and office xp in it. BUT when I move my
    application to another machine that have vs.net 2005 express edition with
    office 97 I'm getting this error:
    "Attempted to read or write protected memory. This is often an indication
    that other memory is corrupt."

    when it comes to the second line of this code :
    wrdApp = new Word.Application();
    // Add a new document.
    wrdDoc = wrdApp.Documents.Add(ref oName, ref oFalse, ref oMissing, ref
    Missing);
    Do I have to upgrade the vs.net 2005 express edition to vs.net 2005 and
    word97 to xp to make it work or is it some thing else!?

    Cheers.
    =?Utf-8?B?QmFkaXM=?=, Apr 23, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?QmFkaXM=?=

    David Guest

    Hi,

    Firstly, there are differences in office that can cause this error. I did
    have the same situation and upgraded office to fix it.

    Secondly, office is not supported for automation from within an ASP.NET
    application. Whilst my first point above, I did get it to work, I was having
    serious problems with it, and ultimately changed my direction. I created a
    class to do RTF files and used that instead. Never had a problem since, and
    as RTF can be read by word immediately, it solved my problem.

    --
    Best regards,
    Dave Colliver.
    http://www.AshfieldFOCUS.com
    ~~
    http://www.FOCUSPortals.com - Local franchises available
    "Badis" <> wrote in message
    news:...
    > Hi,
    >
    > I'm using automation to produce word documents, and it's working fine in
    > my
    > machine that have vs.net 2005 and office xp in it. BUT when I move my
    > application to another machine that have vs.net 2005 express edition with
    > office 97 I'm getting this error:
    > "Attempted to read or write protected memory. This is often an indication
    > that other memory is corrupt."
    >
    > when it comes to the second line of this code :
    > wrdApp = new Word.Application();
    > // Add a new document.
    > wrdDoc = wrdApp.Documents.Add(ref oName, ref oFalse, ref oMissing, ref
    > Missing);
    > Do I have to upgrade the vs.net 2005 express edition to vs.net 2005 and
    > word97 to xp to make it work or is it some thing else!?
    >
    > Cheers.
    >
    David, Apr 23, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. humbleaptience
    Replies:
    0
    Views:
    5,472
    humbleaptience
    Feb 22, 2006
  2. =?Utf-8?B?am9obm55Rw==?=

    Attempted to read or write protected memory

    =?Utf-8?B?am9obm55Rw==?=, Apr 19, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,677
    =?Utf-8?B?am9obm55Rw==?=
    Apr 19, 2006
  3. Dhruba Bandopadhyay
    Replies:
    0
    Views:
    5,211
    Dhruba Bandopadhyay
    May 12, 2006
  4. Sudhan
    Replies:
    1
    Views:
    622
  5. Replies:
    0
    Views:
    5,278
Loading...

Share This Page