Problem get outlook instance from ROT

Aug 20, 2013 at 9:00 AM
Hi

I get errors if I try to get the outlook instance from ROT.

Error 1: Property "Visible" cannot read. Member not found.
Error 2: MK_E_UNAVAILABLE
object outlookProxy = System.Runtime.InteropServices.Marshal.GetActiveObject("Outlook.Application");
Outlook.Application outlookApplication = new Outlook.Application(null, outlookProxy);
I've read some other posts and articel and get the information that outlook need more time to register in the ROT. If I wait for example two or three minutes everything is working correctly. But this is not good to work with it.

Is a other solution or workaround available to avoid this problem?
Coordinator
Aug 20, 2013 at 9:13 AM
strange* first time i heard from this problem. can you tell me more?
btw: NetOffice spend a better option:
var test = Outlook.Application.GetActiveInstance(); // use GetActiveInstances to find all instances in process memory

the problem occurs while accessing the visible property?
(please tell me your current NetOffice release)

*Sebastian
Aug 20, 2013 at 9:54 AM
I use NetOffice 1.6.0

If I use Outlook.Application.GetActiveInstance() no error occurs but I also have to wait some minutes before the plugin is working and I can access the chosen mail item. If I run outlook over visual studio in debugging mode it is working immediately
Coordinator
Aug 20, 2013 at 10:19 AM
as first hotfix.
please try as first!!!!!! in your code:

NetOffice.Settings,MessageFilter.Enabled = true;
NetOffice.Settings,MessageFilter.RetryMode = RetryMessageFilterMode.Delayed;

not sure, but can be helpfull. can you tell me more about your operating system( i want reproduce the scenario)

*Sebastian
Aug 20, 2013 at 11:16 AM
This didn't solve the problem. This problem only occurs in outlook. All other office products are working well.

OS: Windows 7 Enterprise SP 1 64 Bit
Office: MS Office Professional Plus 2010 32Bit (14.0.6129.5000)
Developed with VS 2012 and .net 4.5

If u need more information please tell me.
Coordinator
Aug 21, 2013 at 10:03 PM
update: it looks like as security issue. but not sure today. still figure out...
Sep 9, 2013 at 6:31 AM
Hi, do u get more informations? I 've tried a lot but the problem is still not solved!?
Coordinator
Oct 25, 2013 at 1:41 PM
web.de hat mir gerade ne fehlerseite präsentiert und danach war deine mail weg. kannst du die bitte nochmal schicken?