View Single Post
  #8  
Old April 29th 07, 04:40 PM posted to microsoft.public.outlook.program_vba
ed
external usenet poster
 
Posts: 114
Default extract email from message body

I can't seem to address the body of the email. I have a routine that cycles
through the index of the Inbox, but am unsure how to actually address the
body of the email. Is it an Item, a message, a body, a PR_body, etc. Can't
seem to address it.

Also, I have a search string, " *@* ", which should work if I can find the
right way to run the body through it. However, the like operator doesn't work
in the AdvancedSearch function.

"Michael Bauer [MVP - Outlook]" wrote:



You can search the addresses with the Instr function. If there's no specific
position for an address then search for the @ character, then for the
following ' ', and with InstrRev for the leading ' '. Knowing that both
position, you can then extract the string with the Mid function.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Wed, 25 Apr 2007 19:00:02 -0700 schrieb Edward:

Can anyone suggest the best way to open each file in an OUtlook

subdirectory
and extract an email address from the body of the email? I have mail

coming
back as undeliverable, and want to prune those addresses from our lists,

but
the address to which the email was sent is not the same as the return
address, which is usually an automated responder from a mail server that
can't find the address in to:

Basically, I'm trying to write code that will say:
go to the undeliverables subdirectory in Outlook;
for each email, check the body of the email for any/all email address(es)
append the email address to a text file;


Ads