I have some code that functions fine unless Outlook has the iManage add-in installed and uses the add-in's "File & Send" functionality.
The code does the following:
- Detect a new email draft
- Check if email draft has
myCustomGuid
property - If it doesn't, add the
myCustomGuid
to the email draft - If
myCustomGuid
is empty, generate a new Guid and add it to themyCustomGuid
property - Check if the email draft has an
EntryID
- If it doesn't, do nothing**
- If it does, use
MailItem.Save()
to persist themyCustomGuid
property/value.
This works fine when one sends a normal email.
However if:
- The draft has
myCustomGuid
property/value - The user selects the iManage 'File & Send' option
- The user clicks send
The myCustomGuid
value is blown away and I end up inserting a new one.
Any ideas on how/why iManage is blowing away the custom property? And/or how to keep it from doing so?
One other interesting tidbit. myCustomGuid
is not overwritten if the user does the following steps:
- The draft has
myCustomGuid
property/value - The user clicks send
- The user is prompted whether they also want to File the item when sending (by iManage)
- The user selects the iManage 'File & Send' option
** This means it hasn't been saved by the user or Outlook's auto-save functionality. So I don't want to persist it as that will create (potentially) an unwanted draft in the drafts folder. Thus why I do nothing.