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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook 2k7 - Catch specific emails and respond

Status
Not open for further replies.

MollyCoddlez

Programmer
Mar 15, 2011
5
GB
Hi peeps, im kinda new to VBA, but i'm quite grounded in VB6 and i need to make a macro for my outlook 2k7

The idea is i want to trigger the event for every new unread email, check the subject and the address its sent from, and when that corresponds i need to pull info out of it, store it in an MDB (which i have a little experience with) and then create a response, but not responding to the sender instead responding to an email address i harvest from the email itself.

The problem is i dont know the events and syntax of outlook VBA hardly at all.

can anyone give me a few pointers please, even some links to nice noob tutorials would help.

Thanks in advance

Molly

 
I guess there are Events, but you can set a Rule (Tools > Rules and Alerts, or somewhere on a Ribbon if you're using 2010) to run what it calls a script, but is really a VBA macro, which receives the mail item as an argument of type "MailItem". In this you can do all you ask - look at the MailItem's Subject and Body properties.

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
Ok, cool, well that means it's going to be far less work than i was expecting. Sweet dude :D

I'll have a play around with that and come back here if i need more help. Thanks Tony

Oh, and by the by, I posted this on 15 million tech help forums.

You are the only person that answered me, thank you.
 
Check out for help with the Outlook VBA.

Also look for the ParseLineText function (outlookcode) for searching for specific information within the body. (very handy)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top