This code run without problem in release r debug when Visual studio isn't started as an admin.
Marshal.GetActiveObject("Outlook.Application");
However, when I start Vs as administrator and run the same line in debug, I get the following error:
System.Runtime.InteropServices.COMException
Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))
How can I fix this.