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
  #1  
Old April 16th 07, 06:15 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default How to store custom data with Folder

Hi,

In order to store my own custom data with an item i used named
properties, and add them via REDEMPTION .HrSetOneProp method ,
is the same possible with folder, and how????

I want create custom property to ost folder e.g. userID property.

By using .HrSetOneProp .. .. .... and passing folder obbject end
up with exception.


Anyone????


TNX in Advance.

Ads
  #2  
Old April 16th 07, 07:47 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to store custom data with Folder

Whenever you need a custom property, it must be a named property (see
http://www.dimastr.com/redemption/utils.htm#xmapi and scroll to the Named
Properties section) to make sure it does not conflict with anybody's else
property.
Also note that while folders in PST stores support named properties,
Exchange folders do not.
The standard way to store folder-wide properties is to create a hidden
(associated) message in that folder with a custom message class and use it
to store the data - see RDOFolder.HiddenItems
(http://www.dimastr.com/redemption/rdo/RDOFolder.htm)

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

"j" wrote in message
oups.com...
Hi,

In order to store my own custom data with an item i used named
properties, and add them via REDEMPTION .HrSetOneProp method ,
is the same possible with folder, and how????

I want create custom property to ost folder e.g. userID property.

By using .HrSetOneProp .. .. .... and passing folder obbject end
up with exception.


Anyone????


TNX in Advance.



  #3  
Old April 16th 07, 07:56 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default How to store custom data with Folder

Thanks fo replay,

So the add Property option in OutlookSpy's IMAPIFOlder is only for pst
folders???
By the way in order to add property (named) in mail item via
OutlookSpy when i should set a property name???



Thanks.

  #4  
Old April 16th 07, 08:28 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to store custom data with Folder

1. You can set a regular property on a folder when using the Exchange
provider of course, but it will fail for a property in the = 0x80000000
range.
2. Click IMessage button on the OutlookSpy toolbar, then click "Add
Property" button.

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

"j" wrote in message
oups.com...
Thanks fo replay,

So the add Property option in OutlookSpy's IMAPIFOlder is only for pst
folders???
By the way in order to add property (named) in mail item via
OutlookSpy when i should set a property name???



Thanks.



  #5  
Old April 16th 07, 09:09 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default How to store custom data with Folder


Thanks,

2. Click IMessage button on the OutlookSpy toolbar, then click "Add
Property" button.


But where in appeared dialog form i set the name for property??? and
ID ?? how should i get it or calculate it.


Dmitry maybe there is workaround concerning the folder's proeperty??
All i need to save is one property
and every time create RDOFolder and check for hidden item and get the
property from this item it will strike the performance.
I should check for this property every time for every mail that i get.


Thanks in advance.

  #6  
Old April 16th 07, 10:57 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to store custom data with Folder

Select the "This is a named property" radio box, then in the ID edit box
specify either an integer ID (if Kind = MNID_ID) or a srting name (if kind
= MNID_STRING). What that id/name is up to you. Same with the GUID: if you
want to make sure nothing ever collides with your custom tag, pick your own
ubique GUID.
As for perfromance, why can't it be stored in the registry? Or cached in
memory?

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

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

Thanks,

2. Click IMessage button on the OutlookSpy toolbar, then click "Add
Property" button.


But where in appeared dialog form i set the name for property??? and
ID ?? how should i get it or calculate it.


Dmitry maybe there is workaround concerning the folder's proeperty??
All i need to save is one property
and every time create RDOFolder and check for hidden item and get the
property from this item it will strike the performance.
I should check for this property every time for every mail that i get.


Thanks in advance.



  #7  
Old April 16th 07, 11:15 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default How to store custom data with Folder

Thanks it works, is it possible to add hidden items to folder via
OutlookSpy?? Is it possible to to view for hidden items
in some folder via OutlokSpy (or only to write scipt in the Script
Editor )??


Suppose i have 20 folders or more and for each folder i should add
property e.g. userID,
for example 3 folders may have same userID property other userID in 2
folders and so on,
so in this case i should create some dictionary list that will have
form userID | FolderName
and for each item arrive (a lot items will arrive pereodically) i
should get the property (named) userID from arrived mailItem
check to wich folder (via dictionary) it's belong and then move.
So in the addIn startUp i should iterate over all my folder tree and
build the dictionary.


Any suggestion, to how implement the scenario above???


Thnx,.

  #8  
Old April 17th 07, 12:42 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to store custom data with Folder

OutlookSpy does not let you add new mesages, neither regular nor associated.
There is no specific reason, it is just nobody asked for that feature :-)
To see tehe existing hidden items, click IMAPIFolder button, then go to the
"Associated Contents" tab.
You did not answer *why* exactly you want to store data on the folder level
rather than registry or file system.

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

"j" wrote in message
oups.com...
Thanks it works, is it possible to add hidden items to folder via
OutlookSpy?? Is it possible to to view for hidden items
in some folder via OutlokSpy (or only to write scipt in the Script
Editor )??


Suppose i have 20 folders or more and for each folder i should add
property e.g. userID,
for example 3 folders may have same userID property other userID in 2
folders and so on,
so in this case i should create some dictionary list that will have
form userID | FolderName
and for each item arrive (a lot items will arrive pereodically) i
should get the property (named) userID from arrived mailItem
check to wich folder (via dictionary) it's belong and then move.
So in the addIn startUp i should iterate over all my folder tree and
build the dictionary.


Any suggestion, to how implement the scenario above???


Thnx,.



  #9  
Old April 29th 07, 04:21 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 109
Default How to store custom data with Folder



The reason to store data on the folder level rather than registry or
file systems is beacause
if some user change his machine or format it's machine all data stored
on registry or file system level are
erased or not available (in case user logged in to other machine and
open Outlook). However when i store
data on folder level, it doesn't matter, cause when user log in to
some machine and configured Outlook to work
against Exchange all data and my data also are syncronized.

What do you think???


Thnask in advance.

  #10  
Old April 30th 07, 07:21 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to store custom data with Folder

Ok, then a hidden item is the way to go.
What kind of data are you storing? Is it really per-folder? If not, you can
store everything as a hidden message in, say, Inbox.
I don't see this as a performance problem as long as you read the data only
wwhen you actually need it and cache it in memory for the lifetime of your
app.

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

"j" wrote in message
oups.com...


The reason to store data on the folder level rather than registry or
file systems is beacause
if some user change his machine or format it's machine all data stored
on registry or file system level are
erased or not available (in case user logged in to other machine and
open Outlook). However when i store
data on folder level, it doesn't matter, cause when user log in to
some machine and configured Outlook to work
against Exchange all data and my data also are syncronized.

What do you think???


Thnask 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 09:26 AM.


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.