Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Hot to get propetyInfo of Microsoft.Office.Interop.Outlook.MailIte
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th July 20:14
jongmin
External User
 
Posts: 1
Default Hot to get propetyInfo of Microsoft.Office.Interop.Outlook.MailIte



Hi all,

I am trying to get propertyInfo of mailItem by the following codes.
However, there is no received properties.
myPropertyInfo's length is always zero.

Is there anybody who can give some information about this issue?

/* ========================================== */
Outlook.Application myApp = new Outlook.ApplicationClass();
Outlook.NameSpace mapiNameSpace = myApp.GetNamespace("MAPI");
Outlook.MAPIFolder myInbox
= mapiNameSpace.GetDefaultFolder(Outlook.OlDefaultFo lders.olFolderInbox);

Type t = typeof(Outlook.MailItem);
PropertyInfo[] myPropertyInfo = t.GetProperties();
foreach (PropertyInfo pInfo in myPropertyInfo)
this.lbxProperties.Items.Add(pInfo.Name);
  Reply With Quote


  sponsored links


2 25th July 20:15
ken slovak - [mvp - outlook]
External User
 
Posts: 1
Default Hot to get propetyInfo of Microsoft.Office.Interop.Outlook.MailIte



That won't work with Outlook item properties at all, even if you use the
overload and specify binding flags.

What you should do is create a dummy mail item, get its ItemProperties
collection, and iterate that.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666