开发者

MAPI_E_INVALID_ENTRYID when getting contact from Outlook via Redemption

开发者 https://www.devze.com 2023-01-01 21:52 出处:网络
I\'d like to retrieve a contact with a known EntryID in a specific folder from outlook/exchange using Redemption.

I'd like to retrieve a contact with a known EntryID in a specific folder from outlook/exchange using Redemption.

The following code calls GetMessageFromID on an RDOSession object. I only want contacts from the standard Contacts folder, so I use the second argument to limit the search space.

RDOFolder folder = Session.GetDefaultFolder(rdoDefaultFolders.olFolderContacts);
RDOContactItem i开发者_开发技巧 = Session.GetMessageFromID(syncRow.SyncId, folder.EntryID, null) as RDOContactItem;

Whenever I do this redemption throws a COM exception: Error in IMAPISession.OpenMsgStore: MAPI_E_INVALID_ENTRYID. What am I doing wrong?


GetMessageFromID takes 2 entry ids as parameters (1 required, 1 optional) - the message entry id and the store entry id. It looks like you are passing a folder entry id instead of a store entry id.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号