Reply to all emails from unique sender in an Outlook folder

You have a folder full of mails from your friends. Now you want to reply to each of them sending some fixed message. One person will get only one reply no matter how many mails are there from that user.  Here's how you can do this:
 
  1. First write an email in Text Format.
  2. Save the email. It will go to "Drafts" folder. Now drag that email to the folder which contains all the emails you want to reply to.
  3. Now press ALT+F11 and paste the macro at the end of the post.
  4. Hit F5 and wait for a long time. You will see, Outbox has all the reply emails.
 
The macro runs through each and every email and then checks if the sender is already replied to. If not replied to, then it gets the body of the message and then makes a reply by combining your message with the body of the message.
 
The benefit of this approach is you are replying to mails sent from someone which has low probability of getting filtered out by spam filters.

Sub ReplytoALLEmail()
    Dim objFolder As Folder


Dim objTemplate As MailItem
Set objTemplate = Application.ActiveExplorer.Selection.Item(1)

Set objFolder = objTemplate.Parent

Dim objItem As MailItem
Dim objReply As MailItem

Dim dic As New Dictionary

Dim strEmail As String

Dim strEmails As String

Dim strBody As String
strBody = objTemplate.Body

For Each objItem In objFolder.Items
If Not (objTemplate = objItem) Then

strEmail = objItem.SenderEmailAddress

If Not dic.Exists(strEmail) Then
strEmails = strEmails + strEmail + ";"

dic.Add strEmail, ""

Set objReply = objItem.Reply()

objReply.Body = strBody + vbCrLf + vbCrLf + objItem.Body

On Local Error Resume Next
objReply.Send
End If
End If

Next

Debug.Print strEmails
End Sub
 
Published Saturday, August 12, 2006 5:25 PM by omar
Filed under:

Comments

# re: Reply to all emails from unique sender in an Outlook folder

Saturday, August 12, 2006 2:02 PM by Christoph Janz
Cool!

# re: Reply to all emails from unique sender in an Outlook folder

Saturday, August 12, 2006 4:24 PM by Thomas Holloway
Haha, nice work :D

# re: Reply to all emails from unique sender in an Outlook folder

Sunday, June 08, 2008 1:07 PM by kelz

hi,

id like to ask if anybody know how to reply to all the emails in one folder?  i have created a folder for each type of emails received in the office and i was just wondering if there is a way to reply to each folder in one message sending, like reply all?  instead of replying one by one. :(

thanks.

Leave a Comment

(required) 
(required) 
(optional)
(required)