A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to store custom data with Folder



 
 
Thread Tools Search this Thread Display Modes
  #11  
Old April 30th 07, 10:33 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default How to store custom data with Folder

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
  #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.



  #13  
Old May 1st 07, 01:38 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default How to store custom data with Folder

Thanks for replay,

In case i'll use RDOMail.Fields i yet need use the GetIDsFromNames
cause i don't know the ProgTag of
named property. So it's same like use the MAPIUtils object .

Am i right??

TNX in Advance.

  #14  
Old May 1st 07, 07:14 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to store custom data with Folder

You *can* use GetIDsFromNames (which RDOMail exposes), but you don't have
to - the RDOMail version of fields also takes a DASL property name
(string) - in that case Redemption will call GetIDsFromNames internally:

Prop =
RDOMail.Fields("http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B")

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

"j" wrote in message
ups.com...
Thanks for replay,

In case i'll use RDOMail.Fields i yet need use the GetIDsFromNames
cause i don't know the ProgTag of
named property. So it's same like use the MAPIUtils object .

Am i right??

TNX in Advance.



  #15  
Old May 2nd 07, 09:03 AM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default How to store custom data with Folder


I see, but Dmitry in DASL 8582000B is my PropTag?? Do you mean that i
should store it??
I don't inderstand, Also in your samples there are only getters of
properties and no setters.


Thanks in Advance.

  #16  
Old May 2nd 07, 09:20 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to store custom data with Folder

Yes, the DASL name includes the GUID and id.
Look at a message which has your custom property set with OutlookSpy (url
below) - click IMessage, locate the property, look at the DASL edit box on
the right hand side of the window. You can hardcode that DASL name in your
code.
Setting a property is not any different from reading it:

RDOMail.Fields("http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B")
= SomeBooleanValue

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

"j" wrote in message
ups.com...

I see, but Dmitry in DASL 8582000B is my PropTag?? Do you mean that i
should store it??
I don't inderstand, Also in your samples there are only getters of
properties and no setters.


Thanks in Advance.



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom _MailItem for Custom Store Tom at GSD Add-ins for Outlook 8 February 16th 07 07:31 PM
How to show data in a custom field in a folder MeAgin Outlook and VBA 1 January 10th 07 03:50 PM
How to disable LOCAL outlook address book and store all data on Se jinshuang Outlook - Using Contacts 3 December 22nd 06 03:30 AM
Where does Outlook 2007 store data? Barry Lacter Outlook - Installation 1 September 29th 06 03:31 PM
Store folder changes loses original folder iag Outlook Express 5 January 10th 06 12:49 PM


All times are GMT +1. The time now is 04:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.