none
error SERVER_DEFAULT RRS feed

  • Question

  • Hello,

    When I use VSTO in a C# program only to put text in a word document, the function

    doc.Words.First.InsertBefore(text) make an exception : HRESULT 0x80010105 RPC_E_SERVERDEFAULT.

    Why ?

    Thanks !

    Tuesday, January 27, 2015 9:59 AM

Answers

  • Thanks for the response!

    I just find a solution.

    I forgot to say it's a standalone application compiled on Xp and used on Win7.

    I had the error on Win7 but not on Xp.

    Finally I used the class ApplicationClass instead of Application, and DocumentClass instead of Document and It runs without error.

    But I don't know how to hide the document because if open a form with the document inside.

    Tuesday, January 27, 2015 4:33 PM

All replies

  • Hello,

    Do you develop a VSTO based add-in or standalone application?

    Where and when do you run the code?

    What property or method call exactly fires the exception?

    I'd recommend breaking the chain of calls and declare each property or method on a single line of code. Thus, you will be able to identify the source property or method of the exception.

    Tuesday, January 27, 2015 11:32 AM
  • Thanks for the response!

    I just find a solution.

    I forgot to say it's a standalone application compiled on Xp and used on Win7.

    I had the error on Win7 but not on Xp.

    Finally I used the class ApplicationClass instead of Application, and DocumentClass instead of Document and It runs without error.

    But I don't know how to hide the document because if open a form with the document inside.

    Tuesday, January 27, 2015 4:33 PM