Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

in oulook .. i want to forward same

Status
Not open for further replies.

aishaaa

Programmer
May 1, 2002
21
AE
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
 
Sorry don't much about this, but in your configuration file above should MAPI not be IMAP. If this is an ignorant comment then I apologise?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top