Hello,
I have an Outlook distribution list of ~50 clients, each of whom needs to be emailed a personal Excel report once a week. I want to produce a macro that would loop through the distribution list, pull the individual email addresses, and apply each address to its own template. The template has a subject line and message (that's the same for everyone) while the new attachment is added manually. In other words, after running the macro, I’d like to see 50 separate drafts, one for each client in the list, with a different email address in each “to” field. Can you fine folks help me out? I have no clue how to write VBA code myself, I just copy, paste, and pray, using stuff I find online. If a macro wouldn't be the best solution, is there another way I could do this?
Cheers,
walu22
P.S. Through searching around online, including stuff posted on this site, I've found the following:
Public Sub InsertSubject()
Dim olkMsg As Outlook.MailItem
Set olkMsg = Application.CreateItem(olMailItem)
olkMsg.Subject = "Client Statement"
olkMsg.Display
olkMsg.To = "*** Email address is removed for privacy ***
Set olkMsg = Nothing
End Sub
Could some sort of loop be added to olkMsg.To in this bad boy?
I have an Outlook distribution list of ~50 clients, each of whom needs to be emailed a personal Excel report once a week. I want to produce a macro that would loop through the distribution list, pull the individual email addresses, and apply each address to its own template. The template has a subject line and message (that's the same for everyone) while the new attachment is added manually. In other words, after running the macro, I’d like to see 50 separate drafts, one for each client in the list, with a different email address in each “to” field. Can you fine folks help me out? I have no clue how to write VBA code myself, I just copy, paste, and pray, using stuff I find online. If a macro wouldn't be the best solution, is there another way I could do this?
Cheers,
walu22
P.S. Through searching around online, including stuff posted on this site, I've found the following:
Public Sub InsertSubject()
Dim olkMsg As Outlook.MailItem
Set olkMsg = Application.CreateItem(olMailItem)
olkMsg.Subject = "Client Statement"
olkMsg.Display
olkMsg.To = "*** Email address is removed for privacy ***
Set olkMsg = Nothing
End Sub
Could some sort of loop be added to olkMsg.To in this bad boy?