c# - Get the target MAPI Folder and EntryID of a MailItem after applying Outlook rules -
i'm creating add-in outlook 2007, handles newmailex
event , gives storeid
of mapi
folder , entryid
of incoming email in folder, after outlook rules applied it. add-in track email later, using getitemfromid()
method of system.namespace class
. tried searching unique pr_search_key
of mailitem, taking time unnecessarily scanning folders , sub-folders. need way remember email, , not searching again.
when handling newmailex entryidcollection containing comma separated string. these guids. need save string somewhere (or id wish save) , can item(s) using
outlook.mailitem mi = thisaddin.application.session.getitemfromid(id, type.missing) outlook.mailitem
where id single id item want. you'll have call once each item in collection. doesn't matter ends after rules applied. id same.
@rotard contact folder use
public string getfolderfullname(outlook.contactitem ci) { outlook.mapifolder mf = ci.parent; string path = mf.folderpath; return path; }
Comments
Post a Comment