I use c# project to work with Microsoft.Office.Interop.Word
I added bookmark to one row of my table like this (in word document)
When i want to find and replace {L.Province.Name}
(just this word) to anything a exception throw with under message :
The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
and when delete "row" bookmark the error gone. even a Find (without replace) method throw exception.
I try different method but all of them has same problem - for example:
Word.Range rng = Doc.Content;
Word.Find find = rng.Find;
find.ClearFormatting();
var res = find.Execute(findText, ref Missing, ref Missing, ref Missing, ref Missing,
ref Missing, ref Missing, ref Missing, ref Missing, ref Missing,
ref Missing, ref Missing, ref Missing, ref Missing, ref Missing);
How can resolve this problem?
User contributions licensed under CC BY-SA 3.0