I think the problem that you are having is that your procedure is never getting the "item".
So your procedure is defined as
Sub delay_delivery(ByVal item As Object)
but when you run it, the "item" parameter never makes it to the procedure. I haven't tested your code, but I'm surprised it doesn't throw some sort of error when you run it.
There are a few ways to do what you want, but each has its own problems.
Note that the users will need macros enabled in Outlook for these to work and may be prompted each time they open outlook.
The first one is a lot simpler, but will not allow you to use your macro, and will cause a prompt each time the user sends a message. This needs to be put in "ThisOutlookSession"
Private Sub Application_ItemSend(ByVal olItem As Object, Cancel As Boolean)
Dim response As Integer
response = MsgBox("Would you like to send this in an hour?", vbYesNo)
If response = vbYes Then
olItem.DeferredDeliveryTime = DateAdd("n", 60, Now)
End If
End Sub
This captures the send event of emails and will put the delay send property on the email if the user chooses to in the message box.
The second way will allow the person to use the macro, however, if the person has multiple emails open, chooses the macro in one of them, but then sends a different one first, it will put the delayed send property on whichever item is sent after choosing the macro. It does reset the delay delivery to false after an email is sent. To do this add the following code to "ThisOutlookSession"
Option Explicit
Private DelaySend As Boolean 'To store whether user wishes to delay
Private Sub Application_Startup()
DelaySend = False 'Set delaysend initially to false
End Sub
Sub delay_delivery()
DelaySend = True 'Set delay send when user clicks macro.
End Sub
Private Sub Application_ItemSend(ByVal olItem As Object, Cancel As Boolean)
If DelaySend = True Then 'Check if user set delay_send
olItem.DeferredDeliveryTime = DateAdd("n", 60, Now)
End If
DelaySend = False 'Reset DelaySend to False
End Sub
If you want to do something else, you could consider capturing new emails using the procedure seen here: Capture New Emails
You would then be able to come up with some way to store the emails that have been opened and whether they have been set to "DelaySend" status, but a fully functioning app like this is beyond the scope of this answer.
EDIT: See this question to see how to interact with the currently open email Current Email and then modify to set the delay delivery flag.