Parsing Email Message Content

  • Thread starter RebekahK20_pontiac
  • Start date
R

RebekahK20_pontiac

I have a database created by getting external data (outlook folder) and
creating a table.
- I sure hope this updates each time the table is opened... if not I need to
fix that as well....

In this table the field 'Contents' contains the entire body of the email. I
need to pull out several key peices of information. This is a system
generated email so it is always in the same format.
I need to pull out the Task ID, The Route, Route Owner, and a url link to the
Route. Not everything is seperated by commas but usually spaces.
Example:

Business Object: Inbox Task IT-0112053

'Inbox Task' 'IT-0112053' has been automatically assigned to 'Group - Vendor
Tech' by the completion of 'Inbox Task' 'IT-0101461' owned by 'mdringler'.
This task is part of 'Route' 'R-0007366'
which is owned by 'mdringler'

I have tried the following in daze of cunfusion and get an 'Invalid Procedure
Call' error...

"Route"=Mid([Contents],InStr([Contents],"Route")+6,InStr([Contents],"which")-
InStr([Contents],"Route")-6)

i think my mind is on auto pilot today or i have just been staring at this so
long i'm lost.

Please help guide me back to the land of the fully functioning.

Thank you in advance
 
G

Guest

You have Route in quotes, which means that you are trying to set the literal
text string of "Route" to a value, which can't be done. Your mid() function
should be equated to a string variable; if that is in fact called Route, the
remove the quotes....

Route = mid(...etc....)
 
P

pietlinden

I have a database created by getting external data (outlook folder) and
creating a table.
- I sure hope this updates each time the table is opened... if not I need to
fix that as well....

Nope. You need to link to the table instead... then you're just
reading the data, instead of copying it. Danny Lesandrini has some
handy stuff for playing with Outlook from Access on his website.

www.amazecreations.com

If you dig around, there's his stuff there too. Look for databases/
Access...
 
R

RebekahK20_pontiac via AccessMonster.com

The only problem is that Access is adding the quotes after I modify it.
It's begining to feel like a monday on thursday....

Rebekah K
You have Route in quotes, which means that you are trying to set the literal
text string of "Route" to a value, which can't be done. Your mid() function
should be equated to a string variable; if that is in fact called Route, the
remove the quotes....

Route = mid(...etc....)
I have a database created by getting external data (outlook folder) and
creating a table.
[quoted text clipped - 27 lines]
Thank you in advance
 
R

RebekahK20_pontiac via AccessMonster.com

Ok - I changed the code a little bit thinking that maybe access was seing
each line seperately so now i'm using the following....

Right([Contents],InStr([Contents],'Route'))

This works - in the fact that it creates the column, but returns no results?.
And I currently have over 1500 entries.

Thanks again!

RebekahK20_pontiac said:
The only problem is that Access is adding the quotes after I modify it.
It's begining to feel like a monday on thursday....

Rebekah K
You have Route in quotes, which means that you are trying to set the literal
text string of "Route" to a value, which can't be done. Your mid() function
[quoted text clipped - 8 lines]
 
R

RebekahK20_pontiac via AccessMonster.com

Thank you - it took a little longer than i expected to actually get my link
to work... there was an issue with being able to 'see' the folder on Outlook..
. but with that worked out - there is finally a light at the end of the
tunnel and it is no longer a freight train...

Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top