Ok. Portanto, coloque isso em ThisOutlookSession
na guia developer
em visual basic
O sub particular verificará seus itens de e-mail que são to
do seu chefe (altere o e-mail, acho que pode ser sensível a maiúsculas e minúsculas)
Se for para o seu chefe, ele executará a macro que verifica a hora e a atrasa. Eu tive alguns problemas com o código send at 8am , você pode precisar mexer com isso.
Private Sub application_itemsend(ByVal item As Object, cancel As Boolean)
Dim myItem As mailItem
Set myItem = item
If myItem.Class = olMail And myItem.To = "[email protected]" Then
Call CheckSendTime
End If
End Sub
Public Sub CheckSendTime()
Dim myobj As Object
Dim myMail As 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 after 5PM
If SendHour > 17 Then 'After 5 PM
SendHour = 34 - SendHour 'Send at 8 am next day
SendDate = DateAdd("h", SendHour, SendDate)
SendDate = DateAdd("n", -MinNow, SendDate)
SendNow = N
End If
'Send the Email
Set myobj = Application.ActiveInspector.CurrentItem
If TypeOf myobj Is Outlook.mailItem Then
Set myMail = myobj
'Check if we need to delay delivery
If SendNow = N Then
myMail.DeferredDeliveryTime = SendDate
End If
Else: myMail.Send
End If
End Sub
Alguns são provenientes de aqui