S
sublimese
Is there any way through any model or tool (Outlook Object Model,
Exchange Extension, Mapi, Redemption, etc...) to block the code on a
custom outlook form from running without changing the custom outlook
form itself. The code to do the blocking would be in an addin.
For example, I have a custom appointment form with the messageclass
IPM.Appointment.CustomTest1
IPM.Appointment.CustomTest1 has code that runs in the Item_Open event.
In my addin, when IPM.Appointment.CustomTest1 opens I do a variety of
checks. Depending on the results of the checks I want to block the
code that is in the Item_Open of IPM.Appointment.CustomTest1 from
running.
A similar situation exists for Item_Write.
IPM.Appointment.CustomTest1 also has code that runs for Item_Write.
In my addin, when IPM.Appointment.CustomTest1 opens, I hook the
Item_Write event, then when the Item_Write event of the addin is hit,
I can perform my logic, make any changes to the appointment I need to
make, save the appointment, then set the Cancel parameter to true,
which will effectively block the Item_Write on the custom form from
occurring. The issue with doing this is that if the user selected
"Save and Close" the form does not close.
For Item_Open I cannot set Cancel=true in the addin event because
doing so stops the item from opening at all.
Is if possible to block the code on a custom form from running without
altering the from itself?
Thank you
Exchange Extension, Mapi, Redemption, etc...) to block the code on a
custom outlook form from running without changing the custom outlook
form itself. The code to do the blocking would be in an addin.
For example, I have a custom appointment form with the messageclass
IPM.Appointment.CustomTest1
IPM.Appointment.CustomTest1 has code that runs in the Item_Open event.
In my addin, when IPM.Appointment.CustomTest1 opens I do a variety of
checks. Depending on the results of the checks I want to block the
code that is in the Item_Open of IPM.Appointment.CustomTest1 from
running.
A similar situation exists for Item_Write.
IPM.Appointment.CustomTest1 also has code that runs for Item_Write.
In my addin, when IPM.Appointment.CustomTest1 opens, I hook the
Item_Write event, then when the Item_Write event of the addin is hit,
I can perform my logic, make any changes to the appointment I need to
make, save the appointment, then set the Cancel parameter to true,
which will effectively block the Item_Write on the custom form from
occurring. The issue with doing this is that if the user selected
"Save and Close" the form does not close.
For Item_Open I cannot set Cancel=true in the addin event because
doing so stops the item from opening at all.
Is if possible to block the code on a custom form from running without
altering the from itself?
Thank you