MAPI

How can I pull the email address from the body of the email message or an attachment, using code like that below?

Private Sub Command1_Click()
Dim i As Integer
Dim app As New Outlook.Application
Dim ns As Outlook.NameSpace
Dim itm As Object
Dim fldr As Outlook.MAPIFolder
Dim ctr As Integer
Dim nm As String
Dim addr As String

Set ns = app.GetNamespace("MAPI")


For Each itm In fldr.Items
If itm.MessageClass = "IPM.Note" Then
MsgBox itm.Recipients.Count
MsgBox itm.Body
MsgBox itm.Display


For i = 1 To itm.Recipients.Count
nm = itm.Recipients.Item(i).Name
addr = itm.Recipients.Item(i).Address
MsgBox nm & addr


Next
End If
Next

End Sub
[1003 byte] By [comart] at [2007-11-15 17:38:03]
# 1 Re: MAPI
Expecially second link can help you

http://www.vb2themax.com/Item.asp?PageID=TipBank&ID=329

http://www.vb2themax.com/Item.asp?PageID=TipBank&ID=328
Cimperiali at 2007-11-10 0:43:59 >