c# - Cannot cast Outlook object to ReportItem -
i trying enumerate different mail items in outlook folder.
some of mail items reportitems ... can tell because class = 46. however, when try cast __comobject reportitem using ((outlook.reportitem)item) exception:
autoresolvedwinner {system.reflection.targetinvocationexception: exception has been thrown target of invocation. ---> system.runtime.interopservices.comexception: operation failed. --- end of inner exception stack trace --- @ system.runtimetype.invokedispmethod(string name, bindingflags invokeattr, object target, object[] args, boolean[] byrefmodifiers, int32 culture, string[] namedparameters) @ system.runtimetype.invokemember(string name, bindingflags bindingflags, binder binder, object target, object[] providedargs, parametermodifier[] modifiers, cultureinfo culture, string[] namedparams) @ system.dynamic.idispatchcomobject.getmembers(ienumerable`1 names)} system.reflection.targetinvocationexception
if helps, messageclass property of object "report.ipm.note.ndr"
help appreciated.
Comments
Post a Comment