B
Ben Crinion
Guys
I have a custom Appointment form with an extra tab on the top to hold SMS
options (IPM.Appointment.SMSAppointment). Clients dont like it when the form
gets sent with meeting requests.
Through much discussion with Dmitry i know which propertys i need to set to
"Nothing" and i do that using a SafeAppointmentItem using the following code
in the Send event of the SMSAppointment Item.
Debug.Print "Send"
'create a SafeItem based on original appointment
Dim sItem 'As Redemption.SafeAppointmentItem
Set sItem = CreateObject("TBOLcom.SafeAppointmentItem")
Debug.Print objAppointment.MessageClass
sItem.Item = objAppointment
'remove props i dont want
Dim pr_form_storage
pr_form_storage =
sItem.GetIDsFromNames("{00063033-0000-0000-C000-000000000046}", &H850F) Or
&H102 ''PT_BINARY
sItem.Fields(pr_form_storage) = Nothing
pr_form_storage =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H8513) Or
&H102
sItem.Fields(pr_form_storage) = Nothing
pr_form_storage =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H850F) Or
&H102
sItem.Fields(pr_form_storage) = Nothing
pr_form_storage =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H851B) Or
&H102
sItem.Fields(pr_form_storage) = Nothing
pr_form_storage =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H8582) Or
&H102
sItem.Fields(pr_form_storage) = Nothing
'send the safe item
sItem.Send
'dont send original item and close the inspector window
objAppointment.Close olDiscard
Cancel = True
ActiveInspector.Close olDiscard
Here is where i start getting problems...
If I don't call the send method of the SafeItem then only the original
(IPM.Appointment.SMSAppointment) item gets sent with the SMS tab still
present.
If i do call the send method of the SafeItem the recipient gets 2 meeting
invites.
If I send the SafeItem (which has no tab) and set the Cancel boolean to true
so that the SMSAppointement item doesnt get sent then the appointment window
stays open with a message saying no invites have been sent which i dont want
a user to see as an invite has been sent in the safe item.
If i then call the close method and discard the message then i get the
following error in a message box from Outlook. "Could not complete the
operation. One or more parameters are invalid." again I dont want the user
to get this error message.
Is there any way i can close the Inspector without getting the "Could not
complete the operation. One or more parameters are invalid." message?
I have a custom Appointment form with an extra tab on the top to hold SMS
options (IPM.Appointment.SMSAppointment). Clients dont like it when the form
gets sent with meeting requests.
Through much discussion with Dmitry i know which propertys i need to set to
"Nothing" and i do that using a SafeAppointmentItem using the following code
in the Send event of the SMSAppointment Item.
Debug.Print "Send"
'create a SafeItem based on original appointment
Dim sItem 'As Redemption.SafeAppointmentItem
Set sItem = CreateObject("TBOLcom.SafeAppointmentItem")
Debug.Print objAppointment.MessageClass
sItem.Item = objAppointment
'remove props i dont want
Dim pr_form_storage
pr_form_storage =
sItem.GetIDsFromNames("{00063033-0000-0000-C000-000000000046}", &H850F) Or
&H102 ''PT_BINARY
sItem.Fields(pr_form_storage) = Nothing
pr_form_storage =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H8513) Or
&H102
sItem.Fields(pr_form_storage) = Nothing
pr_form_storage =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H850F) Or
&H102
sItem.Fields(pr_form_storage) = Nothing
pr_form_storage =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H851B) Or
&H102
sItem.Fields(pr_form_storage) = Nothing
pr_form_storage =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H8582) Or
&H102
sItem.Fields(pr_form_storage) = Nothing
'send the safe item
sItem.Send
'dont send original item and close the inspector window
objAppointment.Close olDiscard
Cancel = True
ActiveInspector.Close olDiscard
Here is where i start getting problems...
If I don't call the send method of the SafeItem then only the original
(IPM.Appointment.SMSAppointment) item gets sent with the SMS tab still
present.
If i do call the send method of the SafeItem the recipient gets 2 meeting
invites.
If I send the SafeItem (which has no tab) and set the Cancel boolean to true
so that the SMSAppointement item doesnt get sent then the appointment window
stays open with a message saying no invites have been sent which i dont want
a user to see as an invite has been sent in the safe item.
If i then call the close method and discard the message then i get the
following error in a message box from Outlook. "Could not complete the
operation. One or more parameters are invalid." again I dont want the user
to get this error message.
Is there any way i can close the Inspector without getting the "Could not
complete the operation. One or more parameters are invalid." message?