Thank you Ken. I am able to capture inspector and mailitem events now.
However I cannot get the mailitem.propertychange event to work. Keep getting a compile error "Procedure declaration does not match description of event or procedure having the same name" Have tried various declarations...
Save this script in ThisOutlookSession
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim myNameSpace As Outlook.NameSpace
Dim myInbox As Outlook.Folder
Dim myItem As Object
Dim strEntryID As String
Dim strCategories As String
'Save and...
To stamp outgoing mails, save this script in ThisOutlookSession
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If TypeName(Item) = MailItem Then
Dim strSubject As String
strSubject = Item.Subject
Item.Subject = strSubject & " " &...
The Outlook developer reference for MailItem.Close event includes the following example to save an item without prompting the user:
Public WithEvents myItem As Outlook.MailItem
Public Sub Initalize_Handler()
Set myItem = Application.ActiveInspector.CurrentItem
End Sub...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.