locked
Exporting email body data to excel wookbook RRS feed

  • Question

  • I am working on a project that needs to extract data from the body of emails. All of the emails are saved in a specific folder [lets call folder name "S:\Research\xxExamplexx"]. The extraction would be a one time event, but I would like to have the option to re-run the extraction again in the future. For the purposes of simplicity, I'd like the data to be exported to a new Excel document called "ICU data".

    I have tried using VBA, but am a total novice, and can't get the macros that I'm finding online to work, probably because I don't understand the syntax.

    Thank you in advance for your help.

    The format of the emails are as follows:

    MRN: : AAAAAAAA

    ICU Bed space: : BB

    Date of  Assessment : CCCCCC

    ICU Attending : DDDDDD

    ICU Attending (Other): EEEEEEE

    Name of PERSON completing this form: : FFFFFFF

    SURGICAL Care Triggers: GGGGGGG

    SURGICAL Care Triggers: : HHHHHHH

    Should SURGERY be consulted based on triggers?   : IIIIII

    Date/time consult was placed : JJJJJJJ

    If SURGICAL consult was not placed--reason: : KKKKKKK

    Comments: : LLLLLLLLL

    I would like the data to be exported to Excel (or as .csv) where each column has a header label, which is the text prior to the ": :" and the information"AAAA", "BBBB", "CCCCCC", etc are values in those columns in one row for each email. 

    I would like the Excel output to look like:

    MRN ICU Bed space Date of Assessment ICU attending
    AAAA1 BBBB1 CCCC1 DDDD1
    AAAA2 BBBB2 CCCC2 DDDD2
    AAAA3 BBBB3 CCCC3 DDDD3

    Again, thank you for your help.

    Thursday, October 22, 2015 4:13 PM

All replies