Outlook VBA to send emails to multiple contact groups with multiple attachments with different subject line for each receipient

jetedf001

New Member
Joined
Jul 7, 2003
Messages
30
A person has left our department and I am having to take over their responsibilities in addition to mine. So, I need a way to cut down and automate a portion of their workload. They send out and receive multiple files to multiple contact groups on a monthly basis.

There are three monthly files that are sent out to close to 50 contract groups on a monthly basis. These files are in the same location (different folders) for the fiscal year and are just saved over each other when they come in. So, we send out a monthly report to providers in April, asking for March data. In this example, data from July through February that the provider has already entered would be included in the file. All of those cells are locked for editing. The provider sends the updated March data into us, we lock the March data and unlock the April data for entry. Then repeat.

The three email attachments go out in a single email separately for each provider. So, during the fiscal year for each provider, I would like to automatically attach the appropriate three attachments relevant to that provider and have a provider specific subject line, something like Provider AAA monthly reports are due May 15. The body of the email can be the same across all emails.

Is this something a macro or VBA could help me with? You guys will be my hero forever, if it can.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
A person has left our department and I am having to take over their responsibilities in addition to mine. So, I need a way to cut down and automate a portion of their workload. They send out and receive multiple files to multiple contact groups on a monthly basis.

There are three monthly files that are sent out to close to 50 contract groups on a monthly basis. These files are in the same location (different folders) for the fiscal year and are just saved over each other when they come in. So, we send out a monthly report to providers in April, asking for March data. In this example, data from July through February that the provider has already entered would be included in the file. All of those cells are locked for editing. The provider sends the updated March data into us, we lock the March data and unlock the April data for entry. Then repeat.

The three email attachments go out in a single email separately for each provider. So, during the fiscal year for each provider, I would like to automatically attach the appropriate three attachments relevant to that provider and have a provider specific subject line, something like Provider AAA monthly reports are due May 15. The body of the email can be the same across all emails.

Is this something a macro or VBA could help me with? You guys will be my hero forever, if it can.
Use the Merge with Attachments facility on my Merge Tools Add-in that is contained in the MERGE TOOLS ADD-IN.zip file that you can download from the following page of my One Drive:

OneDrive

Extract the files from the archive and read the:

“READ ME – Setting up and using the Merge Tools Add-in.pdf

to see how to install and use the various tools.

Using those tools, it is possible to perform the following types of merge that cannot be done with Mail Merge “out-of-the-box”:

● Merge to e-mail messages either with or without attachments, with the documents created by the merge being sent as either Word or PDF attachments or as the body of the e-mail message.

● Merge to individual documents in either Word or PDF format with the filenames being supplied by the data in one of the fields in the data source

● Many to One type merges, which can be used for creating documents such as invoices where there are multiple records in the data source that have common data in one of the fields

● Merging to a document that will include a chart that is unique to each record in the data source

● Merging a document with Content Controls

● Merging a document that contains Legacy FormFields

● Duplex Merges

● Merging to a printer that will collate and staple the output created from each record in the data source.

The requirements for using the system are:

● The mail merge main document must be of the Letters type, though that does not mean that the output cannot be sent as an e-mail message where relevant.

● For the Many To One, Merge with Attachments and Merge to Individual Docs utilities, the data source may be either a table or query in an Access database, or in the form of an Excel worksheet and that worksheet must be the first sheet in the Excel workbook. If the data is on some other sheet, you can easily move that sheet so that it is the first sheet in the workbook by clicking on the sheet tab and dragging it to the left. For the Chart Merge utility, see the Mail Merging with Charts document that is included in the Merge Tools Add-in Zip file for additional requirements for the data source for use with that utility

● For a data source in the form of an Excel worksheet, the field names must be in the first row of the worksheet and there must be a field name in all of the cells in that row that are within the range of columns that contain the data.

● For both types of data source, the field names must contain only alphanumeric characters (No @,#,$,%,&,(,), etc) and the field names must not start with a numeric character (0-9). The number of characters in the field names, including spaces, must not be more than 40.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,849
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top