View Single Post
  #12  
Old May 1st 07, 12:51 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to store custom data with Folder

1. Your code should be adding the hidden item only once. Check that the
message already exists in the HiddenItems collection (pass the appropriate
subject to the RDOItems.Item method). If NULL is returned, call
HiddenItems.Add.
2. A property can be added using RDOMail.Fields - see
http://www.dimastr.com/redemption/rdo/MAPIProp.htm . There is abolsutely no
reason to use MAPIUtils object in this case.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"j" wrote in message
ups.com...
Thank you for replay.

The data i need to store are user's details id, user name, ....

Each user has his own folder and sub-folders and also may have other
users folders (delegate)
and to these folders i need to store data. I think it's better to
store hidden item per user's folder
e.g. i have folder AAAAA inside this folder i create hidden item with
user's details, for subfolder
i wouldn't ceate hidden item, cause i can check where i locate in
hierarchy


How i set named properties to hidden item via redemption??
that's what i do:

..........
........
RDO.RDOFolder rFolder = RdoSession.GetFolderFromID(folderEntryID,
folderStoreID, Type.Missing);
RDO.RDOItems rHiddenItems = rFolder.HiddenItems;

/*i will identify my hidden item by subject.*/

.... i check here if item with such subject already exists


rHiddenItem = rFolder.HiddenItems.Add("IPM.Note");
rHiddenItem.Subject = ... some constant string .....;
rHiddenItem.Save();

here i shlould add named properties, how should i add them ?? by help
of
MAPIUtils.HrSetOneProp(rHiddenItem.MAPIOBJECT,
propID, .................
or there are other posibilities?? and also for get these properties.


Thanks in advance.



Ads