Hello,
I'm trying to combine the following two pieces of code, both of which were found online, into a macro that will:
1. Loop through a distribution list
2. Create a new email for each listed email address
3. Attach a PDF to each email based on the name in the "to field"
4. Save...
Worked like a charm! Thank you much, Diane. :D
Here's the code for those interested:
Public Sub CreateFromTemplateLoop()
Dim MyItem As Outlook.MailItem
Dim myOlApp As Outlook.Application
Dim MyFolder As String
Dim MyFile As String
MyFolder =...
Hello,
I cobbled together the following code (which is designed to loop through a template folder, open each file, and save it as a draft) from examples online. It's presented below.
Public Sub CreateFromTemplateLoop()
Dim MyItem As Outlook.MailItem
Dim myOlApp As Outlook.Application...
Hey Diane,
Apologies for replying so late! Work's gotten crazy, but the mail merge is drawing oohs and ahs from my coworkers! Would saving the files in the same order as the names in distribution list work? In other words, a way to ask VBA to pull the first name in the list and the first file...
I just followed your instructions, Diane, and the code worked perfectly. This is exactly what I'm looking for! If you're ever in Winnipeg, lunch's on me. :)
I am still interested in automating the entire process, but this is a fantastic start.
Thank you,
walu22
The excel file name does change, but I guess it doesn't have to. We currently do it so that each file name includes the date for the week end (i.e. the report is sent out on Monday, contains data from the previous week, and is dated as per this example: Client Statement - Week End October 18...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.