简体   繁体   English

为什么 iManage 的 Outlook 插件文件和发送会导致使用 M​​icrosoft.Office.Interop.Outlook 设置的自定义属性从电子邮件中删除?

[英]Why would iManage's Outlook add-in File & Send cause a custom property set using Microsoft.Office.Interop.Outlook to be dropped off an email?

I have some code that functions fine unless Outlook has the iManage add-in installed and uses the add-in's "File & Send" functionality.我有一些运行良好的代码,除非Outlook 安装了 iManage 插件并使用插件的“文件和发送”功能。

The code does the following:该代码执行以下操作:

  1. Detect a new email draft检测新的电子邮件草稿
  2. Check if email draft has myCustomGuid property检查电子邮件草稿是否具有myCustomGuid属性
  3. If it doesn't, add the myCustomGuid to the email draft如果没有,请将myCustomGuid添加到电子邮件草稿中
  4. If myCustomGuid is empty, generate a new Guid and add it to the myCustomGuid property如果myCustomGuid为空,则生成一个新的 Guid 并将其添加到myCustomGuid属性
  5. Check if the email draft has an EntryID检查电子邮件草稿是否有EntryID
  6. If it doesn't, do nothing**如果没有,什么都不做**
  7. If it does, use MailItem.Save() to persist the myCustomGuid property/value.如果是,请使用MailItem.Save()myCustomGuid属性/值。

This works fine when one sends a normal email.当一个人发送一封普通的电子邮件时,这很好用。

However if:但是,如果:

  1. The draft has myCustomGuid property/value草稿具有myCustomGuid属性/值
  2. The user selects the iManage 'File & Send' option用户选择 iManage 'File & Send' 选项
  3. The user clicks send用户点击发送

The myCustomGuid value is blown away and I end up inserting a new one. myCustomGuid值被吹走,我最终插入了一个新值。

Any ideas on how/why iManage is blowing away the custom property?关于 iManage 如何/为什么会吹走自定义属性的任何想法? And/or how to keep it from doing so?和/或如何阻止它这样做?

One other interesting tidbit.另一个有趣的花絮。 myCustomGuid is not overwritten if the user does the following steps:如果用户执行以下步骤, myCustomGuid不会被覆盖:

  1. The draft has myCustomGuid property/value草稿具有myCustomGuid属性/值
  2. The user clicks send用户点击发送
  3. The user is prompted whether they also want to File the item when sending (by iManage)发送时提示用户是否还想归档项目(通过 iManage)
  4. The user selects the iManage 'File & Send' option用户选择 iManage 'File & Send' 选项

** This means it hasn't been saved by the user or Outlook's auto-save functionality. ** 这意味着它没有被用户或 Outlook 的自动保存功能保存。 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.所以我什么都不做。

First of all, your questions are related to the iManage add-in, so it makes sense to contact iManage developers to get any explanations.首先,您的问题与 iManage 插件有关,因此联系 iManage 开发人员以获得任何解释是有意义的。 This is not the first issue I've met on my way when dealing with iManage add-ins in Outlook.这不是我在 Outlook 中处理 iManage 加载项时遇到的第一个问题。

It seems iManage removes all user properties before sending an email to make sure no winmail.dat files will be attached.似乎 iManage 在发送电子邮件之前删除了所有用户属性,以确保不会附加 winmail.dat 文件。 Both Microsoft Outlook and the Microsoft Exchange Client sometimes use a special method to package information for sending messages across the Internet. Microsoft Outlook 和 Microsoft Exchange 客户端有时都使用一种特殊的方法来打包信息以通过 Internet 发送消息。 This method is technically known as Transport Neutral Encapsulation Format (TNEF).这种方法在技术上称为传输中性封装格式 (TNEF)。 Read more about that in the How email message formats affect Internet email messages in Outlook article.电子邮件格式如何影响 Outlook 中的 Internet 电子邮件一文中阅读有关此内容的更多信息。

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.没有办法避免这种情况,您需要确保添加了该属性,如果没有,您需要在 iManage 进行检查后重新添加它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM