OLE Automation Word 2013 fails when a second instance of word is running

0

I sometimes get 'Call rejected by callee' Exception from HResult 0x80010001, when calling Microsoft.Office.Interop.Word._Document.get_Fullname().

I noticed this is happening when 'outlook preview attachments' is enabled and someone is previewing a Word document inside outlook. Apparently when one previews a Word document, a second instance of WinWord.exe is created. Next OLE calls to Word probably goes to the wrong instance.

After closing outlook, OLE access to Word works like expected. Any idea how I can avoid this problem?

office-interop
asked on Stack Overflow Sep 7, 2015 by rekna

1 Answer

0

What code do you use for creating a Word Application instance?

The fact is that Outlook uses Word as an email editor and for rendering HTML markup. So, that is why you may see a Word process in the list of running processes.

answered on Stack Overflow Sep 7, 2015 by Eugene Astafiev

User contributions licensed under CC BY-SA 3.0