Hi everyone,
I'm using late binding to access Office applications. I don't want to hardcoding the constants (for example Outlook.OlItemType.olMailItem) but to get them at run time by using reflection. Here it is a bit of code:
Type outlookType;
outlookType = Type.GetTypeFromProgID("Outlook.Application");
outlookApplication = Activator.CreateInstance(outlookType);
parameters = new object[1];
parameters[0] = 0; //instead of 0 i would like to get the Outlook.OlItemType.olMailItem constant with Reflection
outlookMessage = outlookApplication.GetType().InvokeMember( "CreateItem",
BindingFlags.InvokeMethod, null, outlookApplication, parameters );
Has somebody an idea how to do it
Best Regards,
Gabriela

Office automation - getting a built-in constant with late binding
Glenn Gomes
Hi Gabriela:
This is actaully a non-VSTO related question. You can, however, post this on the MSDN office.developer.automation newsgroup. Here is the link:
http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.automation&lang=en&cr=US
Thanks!
Mike Hernandez
Community Program Manager
VSTO Team