Hi All, I have some VBA code attached to a button which populates a report to be reviewed by one of my team.
I somehow need to make sure these requests are alternated between the two team members and therefore cannot hardcode the email address into the code.
Is there any way I can alternate who the email is sent to? Currently I have something like this (note this is part of my code and ot the entire thing):
Any help would be appreciated!
I somehow need to make sure these requests are alternated between the two team members and therefore cannot hardcode the email address into the code.
Is there any way I can alternate who the email is sent to? Currently I have something like this (note this is part of my code and ot the entire thing):
Code:
Dim ol As Object
Dim itm As Object
Set ol = CreateObject("Outlook.Application")
Set itm = ol.CreateItem(0)
itm.To = "email1@address.com"
itm.Subject = "BREACH NOTIFICATION"
itm.Body = "Please review the attached identified breach."
itm.Attachments.Add ("C:\Users\user1\Documents\Test1.pdf ")
itm.Send
Set itm = Nothing
Set ol = Nothing
Comment