I have C# application using Microsoft.Interop.Excel and Microsoft.Interop.Word. We have validation that either word or excel one should be open at a time. When on Excel instance open out side of application with Active Cell - in Writing mode then
I call Marshal.GetActiveObject("Excel.Application") to crate instance of Excel but at that time it will give error
Marshal.GetActiveObject(progId);
give Error Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))
Please give me suggestion so i am able to get object of Excel.
Both Excel & Word are single threaded applications. I've gotten that error before because I had Auto Save on Excel turned on. You might want to turn that off and see if that fixes the issue.
DD
User contributions licensed under CC BY-SA 3.0