Thinking through a problem here and thought I would elicit thoughts from the board.
I have a few thousand emails saved as text files. [For the sake of the problem, they are all saved in .txt format]. The issue is that the emails are often chains where the recepient/sender/dates/subject can change in the course of the chain. So one Thread might contain two separate emails:
From: Sender1
To: Recepient1; Recepient2
CC: Recepient3; Recepient4
Subject: Email1
Date: Date1
Text of Email1 here
From: Recepient1
To: Sender1
CC: Recipient3
Subject: Email2
Date: Date2
Text of Email2 here
I have a macro to import all the texts into a spreadsheet. What I am thinking through is how to parse the email into the various pieces of the email chain.
Since the format for the sender/recepient/subject/date is always the same, it seems that some sort of loop would work such as:
For each text:
Find "From:" and return value then
Find "To:" and return value then . . .
Find Next From and if none go to next document.
I am happy to paste the macro for importing text if it will help anyone else think through this with me.
As always, appreciate the help.
I have a few thousand emails saved as text files. [For the sake of the problem, they are all saved in .txt format]. The issue is that the emails are often chains where the recepient/sender/dates/subject can change in the course of the chain. So one Thread might contain two separate emails:
From: Sender1
To: Recepient1; Recepient2
CC: Recepient3; Recepient4
Subject: Email1
Date: Date1
Text of Email1 here
From: Recepient1
To: Sender1
CC: Recipient3
Subject: Email2
Date: Date2
Text of Email2 here
I have a macro to import all the texts into a spreadsheet. What I am thinking through is how to parse the email into the various pieces of the email chain.
Since the format for the sender/recepient/subject/date is always the same, it seems that some sort of loop would work such as:
For each text:
Find "From:" and return value then
Find "To:" and return value then . . .
Find Next From and if none go to next document.
I am happy to paste the macro for importing text if it will help anyone else think through this with me.
As always, appreciate the help.