View Single Post
  #3  
Old September 12th 08, 07:32 PM posted to microsoft.public.outlook.program_vba
Rob
external usenet poster
 
Posts: 146
Default Outlook 2007 VBA and Dumping emails into a CSV File



"JP" wrote:

The most important first step is to state what your goal is, because
there appear to be multiple ways to do what you want. Saying you want
to dump emails into a text file is limiting your goal to just one
particular solution.

There are also some details missing. You want to place the text of the
email into Excel, just the Body? What about the headers? Do they all
need to be in one row or column?

There's a tip here that might get you started.

http://www.exceltip.com/st/Log_files...Excel/467.html

It would be simple to loop through a folder in Outlook, assign the
Body of each email to a string, and then write the string to a text
file using the macro code in that link.

HTH,
JP

On Sep 11, 2:57 pm, Rob wrote:
Hi,

I need to dump emails in a specific folder into a text file. I get about
10-20 of these emails per day.

I will then use VBA code to handle the text file and import the data into
excel. I just don't know how to handle the messages in outlook. How would I
write this code?

Thanks,


Thank you for your reply JP. My end goal is to automate the task of
transporting the contents of these emails into an Excel table. I want to do
it programmatically.

Each Email contains 7 rows with a row in between. It looks like the
following...

Overall service rating: 10

Assisting Agent Name: Josh

Additional Comments: Great customer service

Customer Name:

Customer Email Address:

Customer Phone #:

Customer Account #:

In the meantime, I will read this page you suggested and see if I can figure
it out myself...

Ads