![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Fixed!
if (_explorer.Selection[1] is Outlook.MailItem) becomes bool isMailItem = false; Object objectToInspect = _explorer.Selection[1]; Type type = objectToInspect.GetType(); try { if ((Outlook.OlObjectClass)type.InvokeMember("Class", System.Reflection.BindingFlags.GetProperty, null, objectToInspect, null) == Outlook.OlObjectClass.olMail) { isMailItem = true; } } catch (Exception ex) { //eat } if (isMailItem) Pretty obvious, really ![]() Thanks a lot, Ken kenslovak wrote on Wed, 31 March 2010 09:05 So try getting the item as an Object and using Reflection to get the Class property or MessageClass property and examine the item type that way. See if that causes the same problem as your cast. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add-in problem: Process All Marked Header doesn't display email bodies | TTT | Add-ins for Outlook | 2 | March 31st 10 01:03 AM |
Outlook 2007 Retrieving Message Bodies for Marked Headers | Llew Ralph | Outlook - General Queries | 0 | January 1st 10 09:22 AM |
message bodies do not display | MattG | Outlook Express | 3 | July 6th 07 01:51 AM |
message bodies do not display | Mark | Outlook Express | 1 | February 9th 06 02:28 AM |
OE 6 does not display message bodies | Patrick E. King | Outlook Express | 1 | January 27th 06 01:30 AM |