ThisOutlookSession not triggering for TaskItems

Not open for further replies.

Perry Garrod

New Member
Outlook version
Outlook 2013 32 bit
Email Account (as MS Exchange)
I'm using code in ThisOutlookSession which triggers all events when processing a Task, i.e. Open, Read, AddAttachment, Close.
Everything works as expected excepting when I open more than one Task.
Whilst the opening triggers work fine, repeatedly for subsequent Task opens, when it comes to changing or even closing the Tasks in turn, the only Task that subsequently triggers the macro is the last one opened.
How can I get ALL opened Tasks to continue to execute the macro/triggers?

You need to keep each reference until the item is being closed. Here's an example: Inspector Wrapper

As the description is in German, here's the most important things: The code until the '</DieseOutlookSitzung>' comment belongs to ThisOutlookSession. For everything below that line add a class module to the project, and name it 'cInspector'.

Use ctrl+h to replace the words DieseOutlookSitzung by ThisOutlookSession, and MailItem by TaskItem.
Hi Michael
Have imported the code but fails on execution
Private Sub m_Inspectors_NewInspector(ByVal Inspector As Outlook.Inspector)
Dim oInspector As cInspector
"User defined type not defined."
I've not used inspector before. Am I missing something?
Not open for further replies.

Similar threads