Newbie:Retrieve bodytext from email with VBA

  • Thread starter Thread starter Mario
  • Start date Start date
M

Mario

Hi all ,

I posted this question in the wrong newgroup before.

I'm familiar with VBA in Excel and Access , but not in Outlook.
I'd like to do the following :

When an email arrives in the inbox folder from a specific customer , i'd
like to read the content of the bodytext and paste it into an Excelsheet or
textfile (or an access table.).
Can anyone get me into the right direction on how to accomplish this , or
give me a link where i could search for more info.

Many thanks
Mario
 
If you want to automate the entire process as soon as the e-mail is received,
without you having to do a thing, the code will be a little involved. But
the process is described quite well in this article:

How to create a custom rule in Outlook 2000 by using Visual Basic for
Applications:
http://support.microsoft.com/?kbid=235852

You just need to add your own logic to look for the specific customer. So
you'd take the Item object in the myOlItems_ItemAdd event (as per the example
in the article) and access the Item.SenderEmailAddress and look for a
particular address. If it matches, then you can access Item.Body to get at
the contents. The next bit of code depends on whether you want to put it in
Access or Excel.

There's plenty of help on just about anything regarding programming with
Outlook here:

http://www.outlookcode.com

Let me know if you have any more questions.
 
Hello Eric ,

Thanks for replying. I'll look into it .
I'll probably will have more questions regarding this issue.

Thans a lot
Mario
 
Back
Top