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:

  1. Detect a new email draft
  2. Check if email draft has myCustomGuid property
  3. If it doesn't, add the myCustomGuid to the email draft
  4. If myCustomGuid is empty, generate a new Guid and add it to the myCustomGuid property
  5. Check if the email draft has an EntryID
  6. If it doesn't, do nothing**
  7. If it does, use MailItem.Save() to persist the myCustomGuid property/value.

This works fine when one sends a normal email.

However if:

  1. The draft has myCustomGuid property/value
  2. The user selects the iManage 'File & Send' option
  3. 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:

  1. The draft has myCustomGuid property/value
  2. The user clicks send
  3. The user is prompted whether they also want to File the item when sending (by iManage)
  4. 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.

1

There are 1 best solutions below

0
On

First of all, your questions are related to the iManage add-in, so it makes sense to contact iManage developers to get any explanations. This is not the first issue I've met on my way when dealing with iManage add-ins in Outlook.

It seems iManage removes all user properties before sending an email to make sure no winmail.dat files will be attached. Both Microsoft Outlook and the Microsoft Exchange Client sometimes use a special method to package information for sending messages across the Internet. This method is technically known as Transport Neutral Encapsulation Format (TNEF). Read more about that in the How email message formats affect Internet email messages in Outlook article.

So, to avoid any unwanted attachments they strip out user properties from the mail items. There is no way to avoid that, you need to be sure the property is added, if not, you need to re-add it anew after iManage did its checks.