Skip to content

Instantly share code, notes, and snippets.

@suuhm
Created June 16, 2025 15:06
Show Gist options
  • Save suuhm/1e3a84a192996f67aa8296e9565089a1 to your computer and use it in GitHub Desktop.
Save suuhm/1e3a84a192996f67aa8296e9565089a1 to your computer and use it in GitHub Desktop.
Respond to Multiple Marked Emails with a Combined Reply via Outlook VBA

πŸ“§ Respond to Multiple Emails with a Combined Reply via Outlook VBA

This Outlook VBA script allows you to:

  • Collect sender email addresses from all selected emails
  • Create a single new email
  • Place all senders in the BCC field
  • Use Undisclosed recipients <[email protected]> in the To field
  • Include the original messages as quoted content in the email body

πŸ”§ Features

βœ… Adds all selected senders to BCC

βœ… Custom "To" address for clarity

βœ… Automatically appends the original messages in the reply

βœ… Opens a new draft ready for review


πŸ§ͺ Example Use Case

You’ve received 10 support requests, and you want to send a single status update or response to all senders β€” without revealing their addresses to each other.


πŸš€ How to Use

  1. Open Outlook.
  2. Press ALT + F11 to open the VBA editor.
  3. Insert a new module: Right click > Insert > Module
  4. Paste the code above into the module.
  5. Save and close the editor.
  6. Back in Outlook, select multiple emails.
  7. Press ALT + F8, choose ReplyToMultipleSendersBCC, and click Run.

πŸ”’ Note

This script will not send any email automatically β€” it opens a draft for you to review.

' -----------------------------
' ReplyToMultipleSendersBCC.bas
' _____________________________
'
' (c) 2025 - suuhm
' -----------------------------
Sub ReplyToMultipleSendersBCC()
Dim selectedMail As MailItem
Dim selection As Selection
Dim collectedBCC As String
Dim combinedBody As String
Dim newMail As MailItem
Set selection = Application.ActiveExplorer.Selection
For Each selectedMail In selection
If selectedMail.Class = olMail Then
collectedBCC = collectedBCC & selectedMail.SenderEmailAddress & ";"
combinedBody = combinedBody & vbCrLf & _
"----- Original Message from: " & selectedMail.SenderName & _
" (" & selectedMail.SenderEmailAddress & ") -----" & vbCrLf
combinedBody = combinedBody & selectedMail.Subject & vbCrLf
combinedBody = combinedBody & selectedMail.Body & vbCrLf
combinedBody = combinedBody & String(80, "-") & vbCrLf
End If
Next
Set newMail = Application.CreateItem(olMailItem)
newMail.To = "Undisclosed recipients <[email protected]>"
newMail.BCC = collectedBCC
newMail.Subject = "Re: Reply to multiple inquiries"
newMail.Body = combinedBody
newMail.Display
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment