A
aduckworth
I have been developing some new enhanced code for one of our products
that allows use to monitor emails that are being sent via Outlook. In
order to do this I am using the MAPI COM and specifically the event
sink generated by Outlook to signal events that have occured to an
email - such as Open, Sent, Saved, Closed, etc.
The software works fine under Outlook XP, 2003, etc but the event
trigger in Outlook 2007 is incorrect when you are closing a modified
email and effectively requesting it to be saved in the draft folder.
Let me explain:
Under 2003, you can use COM to create a new email and populate it with
the required info. If the user then click's on the X or close button,
Outlook will display the standard message 'Do you want to save the
changes to "xxxx"? If you click Yes, you will get 2 Save events
followed by a Close event. If you select No, you just get a Close
event. Cancel does nothing. This is fine and allows me to determine
what action the user has taken - saved to draft or cancelled the email
(Closed without saving).
Under 2007, the same method produces a different set of events. When
the user click's close or X you immediately get a close event and then
it displays the 'Do you want to save the changes to "xxxx"? question'.
This is incorrect, as it has not actually been closed yet. I may press
cancel, in which case its state is now wrong. If I select Yes, i do
then get a Save event, but its too late by then - I can no longer
determine the state of the email as there is no way of actually
determining if they have pressed No or Cancel (You can not wait for a
timeout to see if you get the Save event, the user may be busy and
ignoring the 'Do you want to save the changes to "xxxx"?' question,
nor is it practicale to trawl the draft folder looking to see if it
eventually appears there).
Does anyone know if this bug has been corrected in Outlook 2007 or
even reported? Does anyone know of a different method I could try to
determine the state of the email? I have tried phoning the developent
support, but they want to charge me to fix/look at the problem, which
is a little unfair, unless I can find a knowledge base article on it -
a catch 22 until it is fixed.
that allows use to monitor emails that are being sent via Outlook. In
order to do this I am using the MAPI COM and specifically the event
sink generated by Outlook to signal events that have occured to an
email - such as Open, Sent, Saved, Closed, etc.
The software works fine under Outlook XP, 2003, etc but the event
trigger in Outlook 2007 is incorrect when you are closing a modified
email and effectively requesting it to be saved in the draft folder.
Let me explain:
Under 2003, you can use COM to create a new email and populate it with
the required info. If the user then click's on the X or close button,
Outlook will display the standard message 'Do you want to save the
changes to "xxxx"? If you click Yes, you will get 2 Save events
followed by a Close event. If you select No, you just get a Close
event. Cancel does nothing. This is fine and allows me to determine
what action the user has taken - saved to draft or cancelled the email
(Closed without saving).
Under 2007, the same method produces a different set of events. When
the user click's close or X you immediately get a close event and then
it displays the 'Do you want to save the changes to "xxxx"? question'.
This is incorrect, as it has not actually been closed yet. I may press
cancel, in which case its state is now wrong. If I select Yes, i do
then get a Save event, but its too late by then - I can no longer
determine the state of the email as there is no way of actually
determining if they have pressed No or Cancel (You can not wait for a
timeout to see if you get the Save event, the user may be busy and
ignoring the 'Do you want to save the changes to "xxxx"?' question,
nor is it practicale to trawl the draft folder looking to see if it
eventually appears there).
Does anyone know if this bug has been corrected in Outlook 2007 or
even reported? Does anyone know of a different method I could try to
determine the state of the email? I have tried phoning the developent
support, but they want to charge me to fix/look at the problem, which
is a little unfair, unless I can find a knowledge base article on it -
a catch 22 until it is fixed.