Set a default 'Do not Deliver before' time

Last reviewed on October 3, 2012

Set a later delivery time in Message OptionsWhile you can't change the default time for 'do not deliver before', you can use VBA to set the delivery time and save a few steps.

In the code example at Create a deferred Birthday message for an Outlook Contact I use the contact's birthday as the new deferred to date.

In the code samples on this page, the date is calculated to be today at 8:24 AM. By changing the decimal, you can send it at other times: .25 = 6 AM, .50 = noon, .75 = 6 PM.

You can also use a specific time by entering it in this format:

SendAt = DateSerial(Year(Now), Month(Now), Day(Now)) + #8:00:00 AM#

The first sample opens a new message form with the deferred time. The second sample is for users who pick from the contacts folders - select a contact then run the macro to open a new message addressed to the contact.

To enter a time each time you create a message using the macro, replace the SendAt = line with the following line. This will open a dialog for you to type the delivery time. Cancelling the dialog will open a message form without deferring delivery.

SendAt = InputBox("Enter a time or click Cancel if you don't want to defer this message. ", "Send this message at", Now())

Add the macro to Outlook's VB Editor then customize the ribbon or toolbar, assigning the macro to a button. When you want to send a deferred message, use the 'Deferred' button you created.

Defer message macro

Public Sub SendDeferredMessage()
Dim objMsg As MailItem
Dim SendAt

Set objMsg = Application.CreateItem(olMailItem)

'send at 8:24 AM. .25 = 6 AM, .50 = noon
SendAt = DateSerial(Year(Now), Month(Now), Day(Now)) + 0.35

  objMsg.DeferredDeliveryTime = SendAt

  'displays the message form
  objMsg.Display
  
  Set objMsg = Nothing

End Sub

Address message to selected contact and defer

Public Sub SendDeferredMessagetoContact()

Dim SendAt
If TypeName(ActiveExplorer.Selection.Item(1)) = "ContactItem" Then
 Set oContact = ActiveExplorer.Selection.Item(1)
 
'send at 8:24 AM. .25 = 6 AM, .50 = noon
SendAt = DateSerial(Year(Now), Month(Now), Day(Now)) + 0.35


Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)

  objMsg.To = oContact.Email1Address
  objMsg.DeferredDeliveryTime = SendAt

  'displays the message form
  objMsg.Display
  
  Set objMsg = Nothing

Else
MsgBox "Sorry, you need to select a contact"
End If


End Sub

Written by

Diane Poremsky
A Microsoft Outlook Most Valuable Professional (MVP) since 1999 and involved in IT support since 1985, Diane is the author of several books and video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.