I\'m new in the ways of VBA and I want to create a rule (script) that can automatically forward an email received in my Outlook inbox with a specified delay? Can you please give
Try using DeferredDeliveryTime Property Which sets the time mail is to be delivered.
Example
Option Explicit
Public Sub Example()
Dim Item As Outlook.MailItem
Set Item = Application.CreateItem(0)
With Item
.Subject = "test"
.To = "0m3r"
.DeferredDeliveryTime = DateAdd("n", 10, Now)
Debug.Print Item.DeferredDeliveryTime
.Send
End With
Set Item = Nothing
End Sub
DateAdd Function
DateAdd("n", 10, Now)
+--------+-----------------+
| Value | Explanation |
+--------+-----------------+
| yyyy | Year |
| q | Quarter |
| m | Month |
| y | Day of the year |
| d | Day |
| w | Weekday |
| ww | Week |
| h | Hour |
| n | Minute |
| s | Second |
+--------+-----------------+