AtTips, Tricks & Tools
for Microsoft® Office Outlook®

Green arrowBuy an Upgrade now

Deutsch
Tips Programming Get read-/deliver request confirmation by mouse click

Get read-/deliver request confirmation by mouse click

In Outlook® you can generally request and read- and/or delivery confirmation or for each case in the options of a new e-mail. To get a request by a mouse click you can use the following code example.

To use this example please read the important notes and have a look to the workshop Use VBA in Outlook®. Please insert this code into a new module (Insert -> Module in the VBA-Editor).

For Outlook® 2000, Outlook® 2002, Outlook® 2003, Outlook® 2007

Option Explicit
 
Public Sub SetDeliverRequest()
 
    ' Get only a delivery request
    Call SetEmailRequest(True, False)
 
End Sub
 
Public Sub SetReadRequest()
 
    ' Get only a read request
    Call SetEmailRequest(False, True)
 
End Sub
 
Public Sub SetDeliverAndReadRequest()
 
    ' Get both
    Call SetEmailRequest(True, True)
 
End Sub
 
Private Sub SetEmailRequest(ByVal blnDeliver As Boolean, ByVal blnRead As Boolean)
 
    '=====================================================================
    ' Get a read and/or delivery request for the current e-mail.
    ' (c) Peter Marchert - http://www.outlook-stuff.com
    ' 2008-11-20 Version 1.0.0
    ' Call for both: Call SetEmailRequest(True, True)
    ' Call for delivery request: Call SetEmailRequest(True, False)
    ' Call for read recipient request: Call SetEmailRequest(False, True)
    '=====================================================================
 
    On Error Resume Next
 
    '---------------------------------------------------------------------
    ' Does not work with received items
    '---------------------------------------------------------------------
    If Not Year(Outlook.ActiveInspector.CurrentItem.ReceivedTime) = 4501 Then Exit Sub
 
    '---------------------------------------------------------------------
    ' Set the delivery request?
    '---------------------------------------------------------------------
    If blnDeliver Then
        Outlook.ActiveInspector.CurrentItem.OriginatorDeliveryReportRequested = True
    End If
 
    '---------------------------------------------------------------------
    ' Set the read request?
    '---------------------------------------------------------------------
    If blnRead Then
        Outlook.ActiveInspector.CurrentItem.ReadReceiptRequested = True
    End If
 
    '---------------------------------------------------------------------
    ' May be no e-mail was selected
    '---------------------------------------------------------------------
    If Not Err.Number = 0 Then Exit Sub
 
    '---------------------------------------------------------------------
    ' Message to the user
    '---------------------------------------------------------------------
    If blnDeliver And blnRead Then
        MsgBox "For this e-mail a delivery and read request will be asked for." _
            , vbInformation + vbOKOnly
    ElseIf blnDeliver Then
        MsgBox "For this e-mail a delivery request will be asked for." _
            , vbInformation + vbOKOnly
    ElseIf blnRead Then
        MsgBox "For this e-mail a read request will be asked for." _
            , vbInformation + vbOKOnly
    Else
        MsgBox "Wrong function call (False, False)!" & vbCrLf & vbCrLf & _
            "Please set at least 1 parameter to ""True""." _
            , vbCritical + vbOKOnly
    End If
 
End Sub

Newsletter

NewsletterSorry, the Newsletter Service from outlook-stuff.com is currently only available in German. If you are nevertheless interested you may translate them with an online translation service.

Cart

Your cart is empty
Show the product page...

Product State

Updates

Report a bug

On this page you have a bug:

Newsflash

4. Newsletter wurde verschickt!

Sorry, no translation available.

Heute wurde der 4. Newsletter an alle Abonennten verschickt.

 Read more...

Lifetime Updates incl.!

Yes, it is really true: In outlook-stuff.com, you pay not a penny extra for updates!
Lifetime Updates incl.!

Pay once = use forever!

to the Shop...

Product Range

Close