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

Problem get outlook instance from ROT

Aug 20, 2013 at 10:00 AM

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

Error 1: Property "Visible" cannot read. Member not found.
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?
Aug 20, 2013 at 10: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)

Aug 20, 2013 at 10: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
Aug 20, 2013 at 11: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)

Aug 20, 2013 at 12:16 PM
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.
Aug 21, 2013 at 11:03 PM
update: it looks like as security issue. but not sure today. still figure out...
Sep 9, 2013 at 7:31 AM
Hi, do u get more informations? I 've tried a lot but the problem is still not solved!?
Oct 25, 2013 at 2:41 PM hat mir gerade ne fehlerseite präsentiert und danach war deine mail weg. kannst du die bitte nochmal schicken?