C# 无法将Outlook对象强制转换为ReportItem
我正在尝试枚举Outlook文件夹中的不同邮件项目 有些邮件项目是ReportItems。。。我能说出来,因为他们的班级=46。但是,当我尝试使用((Outlook.ReportItem)项将_ComObject强制转换为ReportItem时,出现以下异常:C# 无法将Outlook对象强制转换为ReportItem,c#,outlook,C#,Outlook,我正在尝试枚举Outlook文件夹中的不同邮件项目 有些邮件项目是ReportItems。。。我能说出来,因为他们的班级=46。但是,当我尝试使用((Outlook.ReportItem)项将_ComObject强制转换为ReportItem时,出现以下异常: AutoResolvedWinner {System.Reflection.TargetInvocationException: Exception has been thrown by the target of an inv
AutoResolvedWinner {System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: The operation failed.
--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Dynamic.IDispatchComObject.GetMembers(IEnumerable`1 names)} System.Reflection.TargetInvocationException
如果有帮助,对象的MessageClass属性为“REPORT.IPM.Note.NDR”
我们将不胜感激