R
rattanjits
The Outlook developer reference for MailItem.Close event includes th
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
Private Sub myItem_Close(Cancel As Boolean)
If Not myItem.Saved Then myItem.Save
End Sub
I copied the example into Thisoutlooksession - and editted and closed
message - but it did not run. I have no knowledge of using Outloo
events (other than events in the Application class which ru
automatically). Please advise
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
Private Sub myItem_Close(Cancel As Boolean)
If Not myItem.Saved Then myItem.Save
End Sub
I copied the example into Thisoutlooksession - and editted and closed
message - but it did not run. I have no knowledge of using Outloo
events (other than events in the Application class which ru
automatically). Please advise