2012-04-03 92 views
3

我试图让在Outlook中的邮件的附件的内容ID的。我使用Add-In Express作为我的加载项,但它没有功能来获取它。获取附件内容识别

我知道赎回库,但它不是免费的,因此不适合我的选择。

在Outlook 2007+存在PropertyAccessor接口,这应该允许我这样做,但我不能得到它的工作。

这里我的代码:

string uniqueId = ""; 
object props = a.GetType().InvokeMember("PropertyAccessor", BindingFlags.Public | BindingFlags.GetField | BindingFlags.GetProperty, null, a, null); 
object[] args = new object[1]; 
args[0] = @"urn:schemas:mailheader:content-id"; 
object value = props.GetType().InvokeMember("GetProperty", BindingFlags.Public | BindingFlags.InvokeMethod, null, props, args); 
if ((string)value != null) { 
    uniqueId = (string)value; 
} 

“a” 是从一个外接快速的MailItem得到的附件。

它只是抛出以下异常:“异常已通过调用的目标引发异常。”

有人可以帮助我吗?

回答

0

我想你的URN,以及和它没有工作。

使用DASL,这个工程:http://schemas.microsoft.com/mapi/proptag/0x3712001F

展望间谍有一个免费试用期。我会在此期间下载(这是我发现此值的地方)。即使到期,这个有价值的工具也不如救赎本身。