item send not tigering.

densetax2

Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Private WithEvents Items As Outlook.Items

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Item = MailItem
If Item.To = "abc@abc.com" Then
prompt$ = "Are you sure you want to send this message?"
If MsgBox(prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check before Sending") = vbNo Then
Cancel = True
End If
End If

End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

densetax2

Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Tried that as well. but nothing happened. is it i am doing wrong. I created - Thisoutlooksession > insert > module > added the code and saved.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Do you have macro security set to low? Tools, Trust center, macro security to check.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Any addins? Some mentioned today that an addin was keeping their macros from working and when they disabled the addin, macros worked. (They were able to re-enable the addin and all is well now.)
 
Top