Obtaining address of Email recipients:   Return to List

' Remember -- there can be more than 1 recipient
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If Item.Class = olMail Then
        sTo_Email = strReceiverEmail(Item)
    End If
End Sub

Private Function strReceiverEmail(ByRef objMail As MailItem) As String
' obtain receiver email message from recipients collection
On Error GoTo BYE
' declare locals
Dim colRecips As Outlook.Recipients
Set colRecips = objMail.Recipients
For i = 1 To colRecips.Count
    strReceiverEmail = strReceiverEmail & "; " & colRecips.Item(i).Address
Next
strReceiverEmail = Right(strReceiverEmail, Len(strReceiverEmail) - 2)
BYE:
End Function



Note to Webmaster