Hi all can you help as my computer will be the next thing to go out the window
I am trying to read the inbox within outlook and capture the sender's email
address in two places
1) The from box
2) The body of the message
Question 1 what command do I use to read the from address of an email
Question 2 How would I be able to determine if the email is the within the
body of the text what do I write if the it contains a @ .
I have put together a bit of code fi you could tell me what i have to do next
Private Sub email()
Dim objApplication As Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objMAPIFolder As Outlook.MAPIFolder
Dim objContactItem As Outlook.ContactItem
Dim objMailItem As Outlook.MailItem
Set objApplication = New Outlook.Application
Set objNameSpace = objApplication.GetNamespace("MAPI"
Set objMAPIFolder = objNameSpace.GetDefaultFolder(olFolderInbox)
Set objMAPIFolder = objNameSpace.Folders(2).Folders(2)
For Each objMailItem In objMAPIFolder.Items
MsgBox objMailItem.BCC
'End
Debug.Print objMailItem.BCC
Next objMailItem
End Sub
Can you help?