VBOffice

Request an Email Read Receipt

See how to request a read receipt based on the recipient of the message.

Last modified: 2008/11/19 | Accessed: 19.668  | #72
◀ Previous sample Next sample ▶
Reporter Reporter
VBOffice Reporter is an easy to use tool for data analysis and reporting in Outlook. A single click, for instance, allows you to see the number of hours planned for meetings the next month.

In Outlook you could set for all of your sent emails to request a read receipt from the recipients. If you want the receipt only for certain messages, you'd have to go into the Options dialog for each message, which would be quite troublesome.

The following script enables Outlook to automatically request a read receipt depending on the recipient.

The variable 'Request' controls whether a read receipt should be requested (True) or not requested (False). The variable 'Addresses' holds the e-mail addresses. You can enter full e-mail addresses or domain names. Customize both variables for your needs, and enter the addresses delimited by a comma.

Also note: It's always the recipient's decision whether or not the receipt will be sent to you. You can't influence that.


tip  How to add macros to Outlook
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
  If TypeOf Item Is Outlook.MailItem Then
    SetReadReceipt Item
  End If
End Sub

Private Sub SetReadReceipt(Mail As Outlook.MailItem)
  Dim i&, y&
  Dim Adr$
  Dim Recipients As Outlook.Recipients
  Dim Addresses As Variant
  Dim Request As Boolean

  ' customize
  Request = True
  Addresses = Array("abc@domain.de", "@domain.com")

  Set Recipients = Mail.Recipients

  For i = 1 To Recipients.Count
    Adr = Recipients.Item(i)

    For y = 0 To UBound(Addresses)
      If InStr(1, Adr, Addresses(y), vbTextCompare) Then
        Mail.ReadReceiptRequested = Request
        Exit Sub
      End If
    Next y
  Next i
End Sub
ReplyAll ReplyAll
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail.
email  Send a message