Rule to pop a warning dialogue on certain actions

Not open for further replies.

Michael Bass

New Member
Outlook version
Outlook 2010 64 bit
Email Account
I have a rule set up so that when the conditions are met, it defers delivery by two hours. I need to know how to make a dialogue box pop up that makes me click OK or continue or whatever warning me that something has tripped this rule because when something does trip my rule, I need to NOT send it and being deferred for the max time of two hours doesn't necessarily mean I will notice it sitting in the outbox. Can someone help me with that?

I'm using Outlook 2010.

Forum Admin

Senior Member
This is a tough one, because I think a run a script rule would be best for it, but you can't run a script in an after send rule. Try this macro - it watches the outbox and when a message has delayed delivery set, it is triggered. The 4501 date is used to prevent it from being triggered with all messages - when the message is not deferred, the delivery time is 1/1/4501.
Option Explicit
Private objNS As Outlook.NameSpace
Private WithEvents objOutboxItems As Outlook.Items

Private Sub Application_Startup()
Set objNS = Application.GetNamespace("MAPI")
Set objOutboxItems = objNS.GetDefaultFolder(olFolderOutbox).Items
End Sub

Private Sub objOutboxItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass <> "IPM.Note" Then Exit Sub
If Item.DeferredDeliveryTime <> FormatDateTime("4501-01-01", vbShortDate) Then
MsgBox "Message is scheduled to send at " & Item.DeferredDeliveryTime
End If
End Sub
see how to use macros if you don't know how to use macros. This needs to go in thisoutlooksession.
Not open for further replies.