![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |