Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / May 2006

Tip: Looking for answers? Try searching our database.

Export Outlook 2003 Email Message To Access 2003 Table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gwhit - 30 May 2006 03:45 GMT
Hello,

My client receives emailed shipping orders sent via Goldmine software into
her Outlook 2003 user-named folder under the Personal Folders tree named
"WHEE".
(The product names and folders are spelled wrong to protect the innocent)

In the body of each email, the orders appear in a two-column table.  The
format never changes, i.e.,

First Column =

BILL TO INFORMATION                                               
Name: Lottie Dah                                                    
Address: 2222 Friggin Deal                                    
City: Big Whoop  State: BO                                        
Phone: (222)456-1234

CREDIT CARD INFO:
Name on Card: Lottie Dah
Method of Pymt: Mastercard
Cred Card #: ################
Exp Date: ####
CVV/CVC: ###

ORDER INFORMATION:
Item 1: Super Duper Rocket To The Moon Vitamins
Qty 1: 1
Price 1: 59.76
Total 1:  59.76
Item 2: Relax After Your Landing - Green Tea
Qty 2: 1
Price 2: 35.73
Total 2: 35.73

Item 3: Bacon-Flavored Lactose Intolerance Formula
Qty 3: 1
Price 3: 25.00
Total 3: 25.00
   
Second Column =

ORDER INFORMATION CONTINUED:
Item 4: Sucker Punch Drink Mix
Qty 4: 1
Price 4: 5.95
Total 4: 5.95

Item 5: Veins of Tungsten Iron Tablets
Qty 5: 2
Price 5: 23.00
Total 5: 46.00

Item 6: Blow N Blast Colon Cleanser
Qty 6: 1
Price 6: 33.00
Total 6: 33.00

My client uses a software called E-Grabber to transfer the data into Access.
The only problem is, the software only regards the first Item data.  Her
workers then have to manually enter the other remaining 5 records.

I've been looking diligently through the internet and have found many
"almosts" using vba to guide me into extracting the entire needed data from
the email body through the WHEE folder and exporting into Access.

I'm sure it's out there, but I've not hit upon it yet.

Many thanks in advance.
Eric Legault [MVP - Outlook] - 30 May 2006 16:36 GMT
Parsing the message body properly will require diligent use of VBA string
procedures, like InStr, Mid, Left, Right, Split, etc.

You can also save the e-mail to a .txt file and use the FileSystemObject and
TextStream Microsoft Scripting Runtime library.  The TextStream object has a
handy ReadLine method that can make parsing a lot easier.

However, if you alter your e-mails to include the relevant data in a
comma-delimited format as an attachment, your efforts in migrating this
information into a database will be significantly decreased.

Signature

Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/

> Hello,
>
[quoted text clipped - 65 lines]
>
> Many thanks in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.