none
MS Word Error Anyone know how to fix this? RRS feed

  • Question

  • The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

    Ok so I have an array, and the first files are processed, but once it gets to the 2nd file in the array I get the above message. the code that errors is is:

    Word_Global_definst.Documents.Open("B:\dosboxRevAg2.conf", False, False, False, "", "", False, "", "", Word.WdOpenFormat.wdOpenFormatAuto)

    I am performing a find and replace. I am working on a new way to do this. What is weird when I first tested this program a month ago it worked fine, but now today I get this error after the first file is processed.

    Any thoughts?

    Wednesday, July 11, 2012 7:53 PM

Answers

  • HI Broggy

    1. Version of Word?

    2. Type of project? VSTO add-in? WindowsForm? Something else?

    3. Please show us the code that declares and instantiates the object for the Word.Application, I'm guessing this may be represented by Word_Global_definst in the snippet you give us.

    In addition, please also show us the code that releases the Word application object, as well as any other objects you've declared and instantiated that are part of the Word object model (such as Word.Document).

    From my experience, the error message most often comes up when code running out of process does not correctly release the COM objects it uses. When it then tries to re-use the same objects, they're still in memory, locking the code out.


    Cindy Meister, VSTO/Word MVP

    • Marked as answer by Broggy69 Friday, March 22, 2013 6:01 PM
    Thursday, July 12, 2012 2:55 PM
    Moderator

All replies

  • Hi Broggy69,

    Thanks for you post.

    There is a special forum to deal with word issue. For better support, I will move this thread to Word for Developers Forum. It will cost a little time to involve the members in this forum. I appreciate your patience.

    Sorry for any inconvenience and have a nice day.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, July 12, 2012 5:40 AM
    Moderator
  • HI Broggy

    1. Version of Word?

    2. Type of project? VSTO add-in? WindowsForm? Something else?

    3. Please show us the code that declares and instantiates the object for the Word.Application, I'm guessing this may be represented by Word_Global_definst in the snippet you give us.

    In addition, please also show us the code that releases the Word application object, as well as any other objects you've declared and instantiated that are part of the Word object model (such as Word.Document).

    From my experience, the error message most often comes up when code running out of process does not correctly release the COM objects it uses. When it then tries to re-use the same objects, they're still in memory, locking the code out.


    Cindy Meister, VSTO/Word MVP

    • Marked as answer by Broggy69 Friday, March 22, 2013 6:01 PM
    Thursday, July 12, 2012 2:55 PM
    Moderator