开发者

MAPI_E_INVALID_ENTRYID when getting contact from Outlook via 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜