Reputation: 4528
Using VS2015 and Outlook 2016...
In my outlook addin, if I do this...
Dim item As Outlook.MailItem = DirectCast(selectedItem, Outlook.MailItem)
Then in the debug watch, it casts item as "system.__comobject" and I can't see properties right.
Same goes with attachements, eventhough I cast them as directcast(myMailItem.Attachment(0), Outlook.Attachment) then it's still a "system.__comobject".
Any idea how to cast them right?
Update: Screenshot...
Upvotes: 0
Views: 50
Reputation: 49397
Try to use CType cast operator instead. Do you get the same results?
I can see all properties of the MailItem instance in the debug watch window.
UPD: I see that you don't use the mailItem object in the window. Try to expand its properties instead.
Upvotes: 0