VBA Open Outlook template based on cell value then email then repeat next row

rplohocky

Active Member
Joined
Sep 25, 2005
Messages
292
Office Version
  1. 365
Platform
  1. Windows
Hello,
I'm looking for code that will open a specific Outlook template based on what is in cell H1, allow to add 3 different cell values to the subject line, then email, automatically, and then move to the next row and do the same thing until there's no more populated rows.

I have 3 different templates saved in a folder on my desktop. The file extension is .msg.

It would look like this...
if H1 says "Assigned" then open template "ASSIGNED" and then grab the data from cell A1 and place in the subject line and then from B1 and C1.

The subject line would look like this...

Driver Add Request Fleet (FROM B1) Workflow# (FROM A1) / (FROM C1)

Any help would be great!
 
Remove the “on error resume next” statement. If an error happens, tell me its number and what the offending code line is.
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Remove the “on error resume next” statement. If an error happens, tell me its number and what the offending code line is.
 
Upvote 0
Remove the “on error resume next” statement. If an error happens, tell me its number and what the offending code line is.

Worf,
All is well and works great! Thanks for all your help!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top