Incoming Message

  • Thread starter Thread starter MEG
  • Start date Start date
M

MEG

I have messages sent to me from a company in a standard format.

The message has fields and data from a form and therefore is in the same
location each time.

When a new message arrives, I'd like to read the message text and then
extract certain data (i.e. email address, First Name, Last Name, etc).

Using these fields, I'd like to send a response inserting the above
extracted data into the message.

What is the best way to do this?

If macros are the way to go, is there sample code to do this?

Thanks,

MEG
 
Do you mean, the data is written within the message text? You can extract
that by using the functions Instr, Left, Right, and Mid. Every function is
explained in the VBA help.

--
Best regards
Michael Bauer - MVP Outlook

: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Tue, 15 Jul 2008 12:21:01 -0700 schrieb MEG:
 
Thank you for your reply.

Yes I want to extract data from the message text. I know how to use those
functions. I'm just unsure how to get the text in the first place.

MEG
 
Sue:

Thank you for your reply.

I placed your ConvertToPlain subroutine in the ThisOutlookSession. Then set
a rule to run it using the RUN A SCRIPT on a rule.

However, the code never runs. Messages come in, but the body text (which is
HTML) stays that way.

Thanks,

MEG
 
That depends on some details. You could use the ItemAdd event of the Inbox.
Please see the VBA help for an example for how to use the ItemAdd event.

That event doesn't fire if your messages are received from an Exchange
server while your Outlook isn't running. It also doesn't fire if more than
16 messages come in at the same time.

--
Best regards
Michael Bauer - MVP Outlook

: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Tue, 15 Jul 2008 13:51:04 -0700 schrieb MEG:
 
Back
Top