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