move contents from hundreds of emails into excel

Status
Not open for further replies.
J

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:
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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

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:
 
J

JP

I have some sample code here you can adapt:

http://www.codeforexcelandoutlook.com/blog/2008/09/export-outlook-contacts-to-excel/

--JP

On Oct 1, 4:07 pm, JSpence2003 <JSpence2...
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:
 
V

volda2000

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:
 
P

pete the greek

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:
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Commodore Unable to move message Using Outlook 3
N Line to move origEmail to subfolder within a reply macro Outlook VBA and Custom Forms 0
C Move or copy from field to field Outlook VBA and Custom Forms 0
T Outlook 365 Move newly created tasks automatically on save. Outlook VBA and Custom Forms 1
NVDon Create new Move To Folder list Outlook VBA and Custom Forms 0
P Print attachments automatically and move the mail to an existing folder called "Ted" Outlook VBA and Custom Forms 4
T Macro to move reply and original message to folder Outlook VBA and Custom Forms 6
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 11
F Excel VBA to move mails for outlook 365 on secondary mail account Outlook VBA and Custom Forms 1
J Dopey move - deleted profile Using Outlook 1
GregS Outlook 2016 Move Outlook to new computer? Using Outlook 4
witzker Macro to move @domain.xx of a Spammail to Blacklist in Outlook 2019 Outlook VBA and Custom Forms 7
G Move tasks up/down todo list by VBA Outlook VBA and Custom Forms 1
S Macro to move “Re:” & “FWD:” email recieved the shared inbox to a subfolder in outlook Outlook VBA and Custom Forms 0
S Outlook Macro to move reply mail based on the key word in the subjectline Outlook VBA and Custom Forms 0
D Move Email with Attachment to Folder Outlook VBA and Custom Forms 3
Eike Move mails via macro triggered by the click of a button? Outlook VBA and Custom Forms 0
G Cannot Move Autocomplete File to New Computer Using Outlook 15
M Move to Folder Using Outlook 1
P Move emails between 2 mailboxes. Using Outlook 0
C Copy Move item won't work Outlook VBA and Custom Forms 2
N Macro to move all recipients to CC while replying Outlook VBA and Custom Forms 0
Commodore Move turns into "copy" Using Outlook 3
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
Jennifer Murphy Ctrl+Tab sometimes will not move through text a word at a time Using Outlook 1
V Outlook 2016 will not move emails in search results Using Outlook 4
M move to iCloud not working in outlook calendar Using Outlook 12
A Create date folder and move messages daily Outlook VBA and Custom Forms 1
Commodore Folders always closed in move/copy items dialog box Using Outlook 3
C Move Outlook 2007 to new PC with Outlook 365 Using Outlook 3
C Can't move folder, the folder is full Using Outlook 0
Nadine Rule to move attachments with specific name Outlook VBA and Custom Forms 1
A Move email items based on a list of email addresses Outlook VBA and Custom Forms 40
T Move calendar invites to new calendar Using Outlook 5
O Rule to move (specific) messages from Sent folder to Specific folder Using Outlook 1
I Automating message move between folders Outlook VBA and Custom Forms 0
K Outlook Rules: Move a Copy Using Outlook 4
K VBA BeforeItemMove event create rule to always move to its folder. Outlook VBA and Custom Forms 4
N Move emails of same conversation to same subfolder Using Outlook 6
P when i move inbox mails to another folder in outlook the mail disappears Using Outlook 1
Peter H Williams How to Move Mail item after processing Outlook VBA and Custom Forms 5
D Move Emails between Folders in Separate Mailbox Outlook VBA and Custom Forms 12
E Search for folder by key in subject then move new message to related folder Outlook VBA and Custom Forms 1
I Outlook 2013 Any way to move .OST file to new system? Using Outlook.com accounts in Outlook 5
O On click,I want to change subject line of selected mail and then reply to particular email and move Using Outlook 3
F "Move to" O365 feature to Outlook client via VBA Outlook VBA and Custom Forms 4
B Macro to manually move selected emails to network folder Outlook VBA and Custom Forms 1
L Making rule to move email to folder from one O365 domain Using Outlook 1
B Copy/Move Exchange inbox to Pop inbox Using Outlook 4
S Send email via SMTP - use transport rules to add to senders inbox (then rule to move to sent items Exchange Server Administration 1

Similar threads

Top