Hi Guys,
I have found the following code which I have adapted to collate the senders email address from the currently selected email. However, I would like to expand on this to also collate the recipients email address.
Can any body offer any input or alternative code which will suit my needs.
Public Sub GetSmtpAddressOfCurrentEmail()
Dim currentExplorer As Explorer
Dim currentItem As Object
Dim sSender As Variant
Set currentExplorer = Application.ActiveExplorer
If Application.ActiveExplorer.Selection.Count = 1 Then
Set currentItem = ActiveExplorer.Selection.Item(1)
sSender = GetSmtpAddress(currentItem)
MsgBox sSender
Else
MsgBox ("Please select only one message.")
Exit Sub
End If
End Sub
I cannot post the function due to URL restrictions, but it can be found here - gregthatcher.com Scripts VBA Outlook GetSmtpAddress.aspx (Replace the spaces with /)
Thanks in advance.