Here is the code I have. It will give me the sender's name if the email is Opened, I need it to give it to me when I highlight the email in the explorer window.
Dim Test As String
Dim myOlApp2 As Outlook.Application
Dim myItem2 As Outlook.MailItem
Set myOlApp2 = CreateObject("Outlook.Application")
Set myItem2 = myOlApp2.ActiveInspector.CurrentItem
Test = myItem2.SenderName
MsgBox (Test)
Any help would be appreciated.
Thanks,
Dim Test As String
Dim myOlApp2 As Outlook.Application
Dim myItem2 As Outlook.MailItem
Set myOlApp2 = CreateObject("Outlook.Application")
Set myItem2 = myOlApp2.ActiveInspector.CurrentItem
Test = myItem2.SenderName
MsgBox (Test)
Any help would be appreciated.
Thanks,