Mahesh Yadav
asked on
How to find out that MailItem object is a new Email or an recieved mail
I am creating an Outlook 2010 Addin,
Now I am giving the feature to open a new email window or an received email.
but I need to figure out that MailItem object is a new email or an Received email object.
could any help me out here
I am this code
Dim MailItem As Outlook._MailItem
Dim Application As Outlook.Application
Application = New Outlook.Application()
For Each inspector In Application.Inspectors
If TypeOf inspector.CurrentItem Is Outlook.MailItem Then
MailItem = inspector.CurrentItem
MailItem.Body += PropertyInfoString
Exit Sub
End If
Next inspector
MailItem = TryCast(Application.Create Item(Outlo ok.OlItemT ype.olMail Item), Outlook._MailItem)
If MailItem IsNot Nothing Then
MailItem.Body += PropertyInfoString
MailItem.Display(False)
End If
Now I am giving the feature to open a new email window or an received email.
but I need to figure out that MailItem object is a new email or an Received email object.
could any help me out here
I am this code
Dim MailItem As Outlook._MailItem
Dim Application As Outlook.Application
Application = New Outlook.Application()
For Each inspector In Application.Inspectors
If TypeOf inspector.CurrentItem Is Outlook.MailItem Then
MailItem = inspector.CurrentItem
MailItem.Body += PropertyInfoString
Exit Sub
End If
Next inspector
MailItem = TryCast(Application.Create
If MailItem IsNot Nothing Then
MailItem.Body += PropertyInfoString
MailItem.Display(False)
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.