# Outlook VBA - Extract email address



## GDunn (Oct 17, 2011)

Can anyone help with some Outlook VBA?

I am looking to extract the email address within the body of a delivery failure notification email.

Therefore extract all text strings with @ included, to a .txt file. 
From a specific Outlook folder.

Thanks in advance


----------



## Derek Brown (Oct 18, 2011)

Have a look at my post #2 at:
http://www.mrexcel.com/forum/showthread.php?t=345240

You may be able to adapt this for your needs.
The code, as given, is run from Excel and will prompt for the Outlook folder to be searched. It then copies the body of each email to a text file and then searches that for required information - it is the "InStr(1, strText, strDelimiter)" that you will need to change to find the information that you need.


----------



## JP2112 (Oct 27, 2011)

I have some code here that might help:

http://www.codeforexcelandoutlook.com/blog/2009/02/bounced-email-list-maker/


----------

