Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See if what I've got between the lines gives you a start. In this case, the
routine looks at the body of each message in the Inbox subfolder named "undeliverables" and if a line containing the @ symbol is found, the line comes up in a message box. I'm assuming you will be listing such lines on a worksheet instead but you said you could handle the Excel portion. '------------------------------------ Sub CheckUndeliverables() Const olFolderInbox = 6 Dim strBody As String Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set objInbox = objNamespace.GetDefaultFolder(olFolderInbox) Set objFolder = objInbox.Folders("Undeliverables") Set colItems = objFolder.Items For Each objItem In colItems strBody = objItem.Body arrLines = Split(strBody, vbCrLf) For x = 0 To UBound(arrLines) If InStr(arrLines(x), "@") 0 Then MsgBox arrLines(x) End If Next x Next objItem Set objFolder = Nothing Set objInbox = Nothing Set objNamespace = Nothing Set objOutlook = Nothing End Sub '------------------------------------ Steve Yandl wrote in message ... I collect all my undeliverable sent Emails in an (Outlook) Inbox folder named "Undeliverables". I 'd like to open them one by one and list the addresses up on an Excel sheet. My VBA knowledge will do for the Excel part but not for the Outlook part. Can you help me? Maybe there is already a posting on this subject but I couldn't find it. Thank you very much. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't get email addresses to be "hot" when using lookup | Excel Worksheet Functions | |||
"Send Email" macro to multiple addresses | Excel Programming | |||
Excel Macro to email to addresses in "Contacts" Tab | Excel Programming | |||
copy/convert column email addresses Hyperlink "mailto:" excel97 | Excel Discussion (Misc queries) | |||
Extracting email addresses from Outlook Contacts | Excel Programming |