I want to get the SenderName
and and To
properties from a MailItem
object, but they are coming through as blank.
I can see that th
try this please
Sub TestMacro()
Dim myOlexp As Outlook.Explorer
Dim myOlSel As Selection
' On Error Resume Next ' do not use during development ... hides errors
Set myOlexp = Application.ActiveExplorer ' "Application" object already exists
Set myOlSel = myOlexp.Selection
For Each myItem In myOlSel
Debug.Print Len(myItem.Subject) ' print the length of each string
Debug.Print Len(myItem.SenderName) ' maybe the strings are being obfuscated somehow
Debug.Print Len(myItem.To)
Next
Set myOlSel = Nothing
Set myOlexp = Nothing
End Sub