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得到的附件。
它只是抛出以下异常:“异常已通过调用的目标引发异常。”
有人可以帮助我吗?