![]() |
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: |
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: |
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: |
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: |
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: |
All times are GMT +1. The time now is 11:38 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-2006 OutlookBanter.com