سؤال

In my application I use Microsoft.Office.Interop.Word library to create .docx file with some content from template. Everything was working correctly on Word 2010 installed (Windows 7/2008 R2) but when I tried it on Windows 8 + Word 2013 I first started to get exception codes:

HRESULT: 0x800706BA
HRESULT: 0x80010105

The thing is that after several runs of my code I got this exceptions throwed from diffrent functions (both my and Microsoft) with diffrent message like:

RPC server is unavailable. HRESULT: 0x800706BA at System.Runtime.InteropServices.CustomMarshalers.EnumeratorViewOfEnumVariant.MoveNext()
Remote procedure call has failed. HRESULT: 0x800706BA at Microsoft.Office.Interop.Word.Bookmark.get_Range()
Server threw an exception. HRESULT: 0x80010105 at Microsoft.Office.Interop.Word.Field.get_Code()

I read wreid things about that errors (eg. http://codeworks.it/blog/?p=136) and I'm looking for any tip.

هل كانت مفيدة؟

المحلول

I have the error 0x800706BA because file already exist in destination. Delete it before.

Vincent

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top