Hello,
I receive daily several mails with either excel or pdf attachments. The attachments have the following format.
[TABLE="border: 1, cellpadding: 1"]
Code:
[/td]1000
[/td]Date
[/td]Company
[/td]Currency
[/td]amount
[/td]remark
[/td]11.11.2017
[/td]AA
[/td]DOLLAR
[/td]20000
[/td]hello
[/td]11.11.2017
[/td]BB
[/td]DOLLAR
[/td]20000
[/td]hello
[/td]12.11.2017
[/td]AA
[/td]DOLLAR
[/td]20000
[/td]hello
[/td]
[/TABLE]
I want to extract the information for today's date into a preexisting excel sheet which looks like that: (The field "name" is already pre-filled according to the "code")
[TABLE="border: 1, cellpadding: 1, width: 500"]
Date
[/td]Company
[/td]Currency
[/td]Amount
[/td]Name
[/td]Code
[/td]Abel
[/td]1000
[/td]Abel
[/td]1000
[/td]Beta
[/td]1005
[/td]Eta
[/td]2099
[/td]
[/TABLE]
Now, what I would love to have is a VBA code that reads the e-mail attachment and copies the relevant data into the preexisting excel sheet so that in the end it will look like this:
[TABLE="border: 1, cellpadding: 1, width: 500"]
Date
[/td]Company
[/td]Currency
[/td]Amount
[/td]Name
[/td]Code
[/td]11.11.2017
[/td]AA
[/td]DOLLAR
[/td]20000
[/td]Abel
[/td]1000
[/td]11.11.2017
[/td]BB
[/td]DOLLAR
[/td]20000
[/td]Abel
[/td]1000
[/td]Beta
[/td]1005
[/td]Eta
[/td]2099
[/td]
[/TABLE]
Is something like this even possible?