Parse Messages

S

Shoelaces

I use Outlook 2003. I receive many canned messages daily from a list I am
on. Within each post are a couple pieces of data that I currently
cut-and-paste into a database. It would be wonderful to have a script that
would take these messages, strip out the few pieces of data (text), and write
a text (CSV) file.

I have absolutely no background in VBA.

Is such a thing possible?

If so, a couple little things about this. What happens if the format of the
messages were to ever change? I do not control the list. If a change were
made to either insert more text, change the layout, etc., I imagine the
script would need to be modified.

Whether the file created were a one-time shot or one that were appended is
not of particular concern to me as I can easily filter out in the database
duplicate entries.

If this were possible, is it something that exists and would be modified to
suit my needs? Is it something that a complete novice could attempt and
reasonably expect to complete? Is it easy enough that someone would be able
to whip up a working script without me feeling extremely guilty for asking?

I truly have no clue what is involved in a task like this.

I appreciate any help that can be offered.
 
S

Sue Mosher [MVP-Outlook]

Yes, it's possible. If you don't want to learn to write the code yourself,
there are tools at http://www.slipstick.com/addins/extract.htm that can do
the data extraction for you.

It's certainly something a novice can do. If you're new to Outlook VBA
macros, these web pages should help you get started:

http://www.winnetmag.com/Articles/Index.cfm?ArticleID=21522&pg=1
http://www.outlookcode.com/d/vb.htm

The sample at http://www.outlookcode.com/codedetail.aspx?id=89 provides a
general framework for extracting data when it appears in name/value pairs.
 
S

Shoelaces

Sue Mosher said:
Yes, it's possible. If you don't want to learn to write the code yourself,
there are tools at http://www.slipstick.com/addins/extract.htm that can do
the data extraction for you.

Thank you for your suggestions. The add-ins appear costly for the
application I would use them for.

So, I am going to take a stab at this myself. The sample code you have at
http://www.outlookcode.com/codedetail.aspx?id=89 would work perfectly for me
if my messages arrived in such a formatted structure. I wish that were so.

Rather, the e-mails I receive are far more "user-friendly" with blocks of
text and the fields I want dropped into the prose. Do you have a suggestion
for locating the fields from such a message? The "container text" can
change, so I am hesitant to begin by stating after the 100th word, etc.
extract this string.
 
S

Sue Mosher [MVP-Outlook]

If there's no structure at all, it may very difficult to locate the
information. Your basic tools are Instr() and other text functions.
Experiment.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Top