Outlook

Send Mass Mail from a folder

Ease of Use

Easy

Version tested with

2010 

Submitted by:

Paleo

Description:

This macro allow you to use a folder to store drafts with many recipients and then send individual messages to each one of them 

Discussion:

Sometimes you have to send the same message to a lot of recipients and you would like to create the impression it was writen individually. Using this macro you can create a draft inserting all recipients separated by ";" in its "To" field, insert the subject and body text and them send it individualy to each and every one. 

Code:

instructions for use

			

Public Sub SepareDrafts() Dim lDraftItem As Long Dim myOutlook As Outlook.Application Dim myNameSpace As Outlook.NameSpace Dim myFolders As Outlook.Folders Dim myDraftsFolder As Outlook.MAPIFolder Dim objMailMessage As Outlook.MailItem Dim emlBody, sendTo As String Dim TOs Set myOutlook = Outlook.Application Set myNameSpace = myOutlook.GetNamespace("MAPI") Set myFolders = myNameSpace.Folders Set myDraftsFolder = myNameSpace.PickFolder For lDraftItem = myDraftsFolder.Items.Count To 1 Step -1 TOs = Split(myDraftsFolder.Items.Item(lDraftItem).To, ";") For i = 0 To UBound(TOs) Set objMailMessage = myOutlook.CreateItem(0) With objMailMessage .To = TOs(i) .Body = myDraftsFolder.Items.Item(lDraftItem).Body .Subject = myDraftsFolder.Items.Item(lDraftItem).Subject .Display .Send End With Next Next lDraftItem Set myDraftsFolder = Nothing Set myNameSpace = Nothing Set myOutlook = Nothing End Sub

How to use:

  1. Open Outlook
  2. Open the VBE (Alt + F11)
  3. From the VBE top menu: Insert | Module
  4. Paste all of the code in the module that was created
  5. Close the VBE
  6. From the Outlook top menu: Tools | Macro | Macros...
  7. Select SepareDrafts() and click Run
 

Test the code:

  1. Create a new message with many recipients
  2. Add a subject and text to its body
  3. Save it to create a draft
  4. Run the macro
  5. You will be asked for a folder
  6. Choose the Drafts folder
  7. Check your sent messages and you will see a individual message to each recipient
 

Sample File:

Módulo1.zip 0.53KB 

Approved by Jacob Hilderbrand


This entry has been viewed 21 times.

Please read our Legal Information and Privacy Policy
Copyright @2004 - 2020 VBA Express