G
Guest
hey all,
given: working with the outlook object model.
Private Sub _oItems_ItemAdd(ByVal Item As Object) Handles _oItems.ItemAdd
MessageBox.Show("You've got mail.")
If TypeOf Item Is Outlook.MailItem Then
_oMsg = DirectCast(Item, Outlook.MailItem)
MessageBox.Show(_oMsg.Subject)
End If
End Sub
I was wondering if I used DirectCast in the correct context. if so, what are
the benefits of doing this?
thanks,
rodchar
given: working with the outlook object model.
Private Sub _oItems_ItemAdd(ByVal Item As Object) Handles _oItems.ItemAdd
MessageBox.Show("You've got mail.")
If TypeOf Item Is Outlook.MailItem Then
_oMsg = DirectCast(Item, Outlook.MailItem)
MessageBox.Show(_oMsg.Subject)
End If
End Sub
I was wondering if I used DirectCast in the correct context. if so, what are
the benefits of doing this?
thanks,
rodchar