in oulook .. i want to forward same msg again and display the body in excel sheet
am using this but its not working
Dim ol As Outlook.Application
Dim ns As NameSpace
Dim folder As MAPIFolder
Dim ws As worksheet
Dim i As Integer
Set ol = creatobject("outlook.application"
Set ns = ol.GetNamespace("mapi"
ns.Logon
setfolder = ns.GetDefaultFolder(olfolferinbox)
Set ws = worksheets("receivemail"
For i = 1 To folder.Item.Count
With folder.Item(i)
ws.[a1].offset(i, 0) = .SenderName
ws.[a1].offset(i, 1) = .Subject
ws.[a1].offset(i, 2) = .Size
ws.[a1].offset(i, 3) = .ReceivedTime
ws.[a1].offset(i, 4) = .Left(.body, 100)
End With
Next 'i
ns.Logoff
Set ol = Nothing
end with
can any one help me ... please
am using this but its not working
Dim ol As Outlook.Application
Dim ns As NameSpace
Dim folder As MAPIFolder
Dim ws As worksheet
Dim i As Integer
Set ol = creatobject("outlook.application"
Set ns = ol.GetNamespace("mapi"
ns.Logon
setfolder = ns.GetDefaultFolder(olfolferinbox)
Set ws = worksheets("receivemail"
For i = 1 To folder.Item.Count
With folder.Item(i)
ws.[a1].offset(i, 0) = .SenderName
ws.[a1].offset(i, 1) = .Subject
ws.[a1].offset(i, 2) = .Size
ws.[a1].offset(i, 3) = .ReceivedTime
ws.[a1].offset(i, 4) = .Left(.body, 100)
End With
Next 'i
ns.Logoff
Set ol = Nothing
end with
can any one help me ... please