Outlook – send emails only during working/business hours

emailmicrosoft-outlook

How do I set my Outlook so that emails I write after business hours and on weekends are delayed and will only be sent during business hours?

I want to make myself look productive, but using my time effectively. Is that too hard to ask?

I can delay single messages to any time, and using rules by up to 120 mins. Can anyone give me any tips on creating a custom rule to send mail only in business hours.

Thanks in advance!

Best Answer

I googled a little bit for a vba (Visual Basic for Applications) solution and found that one:
http://www.vbforums.com/showthread.php?t=574491

This solution is made for Outlook 2003 but it may also work on newer versions of Outlook.

Edit:
Here's the vba code that has to be put in Outlook.

Public Sub CheckSendTime()
    Dim obj As Object
    Dim Mail As Outlook.MailItem
    Dim WkDay As String
    Dim MinNow As Integer
    Dim SendHour As Integer
    Dim SendDate As Date
    Dim SendNow As String

'Set Variables
SendDate = Now()
SendHour = Hour(Now)
MinNow = Minute(Now)
WkDay = Weekday(Now)
SendNow = Y

'Check if Before 8am
If SendHour < 8 Then
    SendHour = 8 - SendHour
    SendDate = DateAdd("h", SendHour, SendDate)
    SendDate = DateAdd("n", -MinNow, SendDate)
    SendNow = N
End If
'Check if after 7PM
If SendHour > 19 Then           'After 7 PM
    SendHour = 32 - SendHour    'Send a 8 am next day
    SendDate = DateAdd("h", SendHour, SendDate)
    SendDate = DateAdd("n", -MinNow, SendDate)
    SendNow = N
End If

'Check if Sunday
If WkDay = 1 Then
    SendDate = DateAdd("d", 1, SendDate)
    SendNow = N
End If

'Check if Saturday
'If WkDay = 7 Then
'    SendDate = DateAdd("d", 2, SendDate)
'    SendNow = N
'End If

'Send the Email
  Set obj = Application.ActiveInspector.CurrentItem
  If TypeOf obj Is Outlook.MailItem Then
    Set Mail = obj
    'Check if we need to delay delivery
    If SendNow = N Then
      Mail.DeferredDeliveryTime = SendDate
    End If
    Mail.Send
  End If

End Sub

Maybe you have to adjust the time.

Related Question