Forum Discussion
Add recipients and email workbook in a macro
- Sep 12, 2024
shetzel In your code there is this line:
Application.Dialogs(xlDialogSendMail).ShowWhat is not widely known is that the Show method accepts arguments. The first argument is the "To" email address. So if you change that code to this:
Application.Dialogs(xlDialogSendMail).Show "email address removed for privacy reasons"the To address wil be prefilled with "email address removed for privacy reasons. ". In addition, the second argument is the subject line.
shetzel In your code there is this line:
Application.Dialogs(xlDialogSendMail).Show
What is not widely known is that the Show method accepts arguments. The first argument is the "To" email address. So if you change that code to this:
Application.Dialogs(xlDialogSendMail).Show "email address removed for privacy reasons"
the To address wil be prefilled with "email address removed for privacy reasons. ". In addition, the second argument is the subject line.
- shetzelSep 12, 2024Brass Contributor
I entred the line you provided and it works for the first email recipient, but how do I get it to go to multiple recipients?
Thanks
- JKPieterseSep 13, 2024Silver ContributorIf you want multiple addresses, use this instead of "address1":
array("address1","address2","address3")- shetzelSep 13, 2024Brass ContributorThank you