Private WithEvents CurrentExplorer As Explorer
Private WithEvents CurrentMailItem As MailItem
....
Private Sub Application_Startup()
..
Set CurrentExplorer = Application.ActiveExplorer
..
End Sub
Private Sub CurrentExplorer_SelectionChange()
..
Set CurrentMailItem = CurrentExplorer.Selection.Item(1)
..
End Sub
Private Sub CurrentMailItem_Reply(ByVal Response As Object, Cancel As Boolean)
... do something here..
End Sub
Private Sub Application_ItemLoad(ByVal Item As Object)
If TypeOf Item Is Outlook.MailItem Then
Set CurrentLoadedMailItem = Item
End If
End Sub
and then hook this "CurrentLoadedMailItem.RepASKER
ASKER
ASKER
Microsoft Outlook is a personal information manager from Microsoft, available as a part of the Microsoft Office suite. Although often used mainly as an email application, it also includes a calendar, task manager, contact manager, note-taker, journal, and web browser.
TRUSTED BY