Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88854

Send email using excel VBA - Recipient and Body depends on different conditions

$
0
0

Hi Im working on a excel worksheet. I update each row once in a while. The last step in the row is send an email based on each cell values.Below are the different columns that I use.

1.Name
2.ID
3.DEP (*5 dept*)
4.Reason ( *15 reason*)
5.Action taken (*5 actions can be take*)
6.Retrain (Yes/No)
7.date
8.send email (*hyperlink*) (=IF(D:D<>"",(HYPERLINK("mailto:"&Q3&"?subject="&D3&"&cc="&$P$27,"Send Email")),"")))

Currently I use a hyperlink for outlook that already has all details. The mail to, cc, bcc all depends on the dep, reason and action taken. The email address and body changes based on these columns. But the problem is that I can't add long body to this hyperlink.So now I usually copy paste each template each time once the outlook email dialogue box shows up with other details. I really need help with VBA TO connect this hyperlink with different body. The name and other details in the body should be based on the each row. I only need to send email once in a while, mostly when I complete one single row.


Viewing all articles
Browse latest Browse all 88854


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>