This project has moved and is read-only. For the latest updates, please go here.

Operation unavailable Exception from HRESULT: 0x800401e3

Dec 5, 2014 at 10:40 PM
Hi Sebastian,

How are you? I upgraded to the 1.7.1 and it solved all my previous issues. Thanx very much.

I have a new problem, which is with excel, not with the NET.OFFICE, but its related and i hoped you will be able to give me a clue.

When my addon opens it tries to do the following code line, which fails:
Object ExcelProxy = System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");

I made a lot of research and it turns out that office registers itself in the ROT only when it loses focus, and not on startup. So my addin cant find in there. I cant find a way to make it loose focus and register itself to the ROT, or a way to cause the addin window to steal the focus from excel.

Did you ever encounter such an issue?

This is a known issue at Microsoft and theres a workaround that doesnt work for me at least:

Dec 6, 2014 at 9:51 AM
Please try:

// get all open excel instances in memory
// btw: GetActiveInstances doesnt use the ROT because some known issues
Excel.Application[] allInstances = Excel.Application.GetActiveInstances();

Dec 6, 2014 at 1:38 PM
Problem Solved.

Thank you very much!