View Single Post
 
Old 09-05-2021, 09:17 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,105
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The problem is that your rule will run after any macro you send. It would be better if you scrapped the rule and used a macro to apply the delay, Using Outlook's ItemSend you can prompt for the delay. Put the following code in the ThisOutlookSession module.



Code:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If TypeName(Item) = "MailItem" Then
        If MsgBox("Defer message?", vbExclamation + vbYesNo) = vbYes Then
            Item.DeferredDeliveryTime = DateAdd("n", 30, Now())
        Else
            Item.DeferredDeliveryTime = DateAdd("n", -30, Now())
        End If
    End If
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote