A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

move contents from hundreds of emails into excel



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 1st 09, 09:07 PM posted to microsoft.public.outlook.program_vba
JSpence2003
external usenet poster
 
Posts: 3
Default move contents from hundreds of emails into excel

I have hundreds of emails that got forwarded from a web form to my email
account. Each email has the same body contents, in that they all have this
basic format below (with different data after each colon). I would like to
try to get a script that can go though this folder, and take the data the
people provided and place it all into Excel rows/columns at one time.
Currently, I copy/paste it into Excel, then I have a macro that takes it from
its current format and moves the data into appropriate fields. This is great,
but can only be done, one email at a time.

Any suggestions?

Add_to_BW_Email_List:
Anniversary_Day:
Anniversary_Month:
BirthdayDay:
Birthday_Month:
address:
city:
email:
name:
state:
submit:
zip:
Ads
  #2  
Old October 2nd 09, 07:17 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default move contents from hundreds of emails into excel



You can loop through the Items collection of the folder to access each item.
The data is found in the Body property, use the Instr, Left, Right, or Mid
functions to find and extract what you're looking for.

Add a reference to the Excel library to your Outlook VBA project via
Tools/References. Then use the object browser (f2), switch from All
Libraries to Excel and see what's available: For instance, Workbooks.Open
opens a workbbok. It has a Sheets collection, and there's a Range object for
working with cells.

--
Best regards
Michael Bauer - MVP Outlook

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


Am Thu, 1 Oct 2009 13:07:04 -0700 schrieb JSpence2003:

I have hundreds of emails that got forwarded from a web form to my email
account. Each email has the same body contents, in that they all have this
basic format below (with different data after each colon). I would like to
try to get a script that can go though this folder, and take the data the
people provided and place it all into Excel rows/columns at one time.
Currently, I copy/paste it into Excel, then I have a macro that takes it

from
its current format and moves the data into appropriate fields. This is

great,
but can only be done, one email at a time.

Any suggestions?

Add_to_BW_Email_List:
Anniversary_Day:
Anniversary_Month:
BirthdayDay:
Birthday_Month:
address:
city:
email:
name:
state:
submit:
zip:

  #3  
Old October 2nd 09, 06:33 PM posted to microsoft.public.outlook.program_vba
JP[_3_]
external usenet poster
 
Posts: 201
Default move contents from hundreds of emails into excel

I have some sample code here you can adapt:

http://www.codeforexcelandoutlook.co...acts-to-excel/

--JP

On Oct 1, 4:07*pm, JSpence2003
wrote:
I have hundreds of emails that got forwarded from a web form to my email
account. Each email has the same body contents, in that they all have this
basic format below (with different data after each colon). I would like to
try to get a script that can go though this folder, and take the data the
people provided and place it all into Excel rows/columns at one time.
Currently, I copy/paste it into Excel, then I have a macro that takes it from
its current format and moves the data into appropriate fields. This is great,
but can only be done, one email at a time.

Any suggestions?

Add_to_BW_Email_List:
Anniversary_Day:
Anniversary_Month:
BirthdayDay:
Birthday_Month:
address:
city:
email:
name:
state:
submit:
zip:


  #4  
Old October 15th 09, 06:46 PM posted to microsoft.public.outlook.program_vba
volda2000
external usenet poster
 
Posts: 1
Default move contents from hundreds of emails into excel

I have just been tasked with the same request. Were you able to get this to
work?

"JSpence2003" wrote:

I have hundreds of emails that got forwarded from a web form to my email
account. Each email has the same body contents, in that they all have this
basic format below (with different data after each colon). I would like to
try to get a script that can go though this folder, and take the data the
people provided and place it all into Excel rows/columns at one time.
Currently, I copy/paste it into Excel, then I have a macro that takes it from
its current format and moves the data into appropriate fields. This is great,
but can only be done, one email at a time.

Any suggestions?

Add_to_BW_Email_List:
Anniversary_Day:
Anniversary_Month:
BirthdayDay:
Birthday_Month:
address:
city:
email:
name:
state:
submit:
zip:

  #5  
Old January 4th 10, 11:11 AM posted to microsoft.public.outlook.program_vba
pete the greek
external usenet poster
 
Posts: 6
Default move contents from hundreds of emails into excel

hi all

just a thought if the body text is divided up by colons you might want to
look at split

BodyArray=split(Myitem.body,":")

this will give you array each element will be the text between the colons

regards



Pete

"volda2000" wrote:

I have just been tasked with the same request. Were you able to get this to
work?

"JSpence2003" wrote:

I have hundreds of emails that got forwarded from a web form to my email
account. Each email has the same body contents, in that they all have this
basic format below (with different data after each colon). I would like to
try to get a script that can go though this folder, and take the data the
people provided and place it all into Excel rows/columns at one time.
Currently, I copy/paste it into Excel, then I have a macro that takes it from
its current format and moves the data into appropriate fields. This is great,
but can only be done, one email at a time.

Any suggestions?

Add_to_BW_Email_List:
Anniversary_Day:
Anniversary_Month:
BirthdayDay:
Birthday_Month:
address:
city:
email:
name:
state:
submit:
zip:

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I export contents of a distribution list to Excel? DAVID FREEBAKER Outlook - Using Contacts 1 June 26th 08 11:13 AM
Emails randomly vanishing by the hundreds Randy Brook Outlook Express 7 January 20th 08 06:14 PM
Copy contents of Excel range name to Email Subject line [email protected] Outlook and VBA 3 June 21st 07 06:14 AM
Invite to hundreds of people Michelle King Outlook - Calandaring 3 February 21st 07 02:55 AM
I appear to be sending hundreds of emails, help! Alan Outlook - General Queries 6 April 22nd 06 06:08 AM


All times are GMT +1. The time now is 01:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.