VBA generating emails, changing a list/table within

VBA generating emails, changing a list/table within

Author
Discussion

Captain Raymond Holt

Original Poster:

12,241 posts

200 months

Wednesday 14th December 2022
quotequote all
Hi all,

I have a bit of vba code which uses an excel input table to draft Outlook emails using a defined template.

It updates various parts (recipient, and various parts of the template) based on the input. The template also contains a table which is fed from the same input. The table contains details of something the recipient needs to take action on, like a to-do (it isnt a to-do list but you get the idea).

1 email is produced per row in the input table.

However… people may have more than 1 thing to action, so Dave Smith, for example, could be on the input table 5 times as he has 5 things to do. I would like to be able to group those 5 things into 5 rows in a single email (the vba would currently draft 5 emails to Dave).

Can anyone point me to what I should be looking at, terms I can google and read up on to make this change? I’m guessing it would add in a cycle along the line of if Dave Smith >1 group xyz or something. I inherited the process and would like to evolve it rather than start afresh.

Cheers


paulrockliffe

15,956 posts

233 months

Thursday 15th December 2022
quotequote all
I don't know the answer, but is this in a proper Office 365 work environment?

If so the answer may be to use Power Automate and you could consider using the Teams Update plugin to collect data too. If it's a personal thing but you have Office 365, Power Automate is there too I think, maybe.

clived

577 posts

246 months

Thursday 15th December 2022
quotequote all
You could just fix it in Excel before you run your Outlook VBA - bit more VBA to add all the actions for one person into the same cell and lose the other rows...