How to add User-defined fields in folder?

Add-in Express™ Support Service
That's what is more important than anything else

How to add User-defined fields in folder?
 
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
1. Yes, private folders. I have just tested on OL2002 SP3 and OL 2003 SP1.
2. No comments...

Can you send me your source code?
Posted 22 Oct, 2004 11:13:48 Top
Vladimir Chtchetkine


Guest


The code is sent to your afalinasoft account. Let me know if you got it.
Thanks a lot for your willingness to help!
Vladimir
Posted 22 Oct, 2004 11:51:04 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
Vladimir,

I will answer tomorrow. Our working day is over :-)
Posted 22 Oct, 2004 11:54:11 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
Vladimir,

Could you please send me the CurrentView.XML that you got after CreateDefaultItem.
Posted 22 Oct, 2004 11:57:24 Top
Eugene Starostin


ADX Team
Add-in Express team


Posts: 430
Joined: 2004-04-05
And... where can I find calls to CurrentView?
Posted 22 Oct, 2004 11:59:16 Top
Guest


Guest


OK, I figured it out and found a work around :-) However, I have no explanation to what I found :-(
*
Basically, here is my algorithm:
1. Create a folder in Outlook.
2. Create an item in this folder and
a) Add some UserProperties to that item (with AddToFolder flag set to true)
b) Create new view and add some cusom columns
So, the problem was with the step 2.a and was caused by the type of the item. What I initially did was creating (using Application’s CreateItem method) and item of type olMailItem. Then I moved (using item’s Move method) that item into my folder and started adding properties to it. And those properties have never appeared in my folder’s “user-defined properties for this folder” list. Instead (as it turned out) they appeared in Inbox’s user-def properties list although item was located in my folder. And every subsequent attempt to add new user property to that item was reflected in Inbox’s list. And that’s what I can’t explain at all :-(
So, the work around that I found was creating olPostItem instead of olMailItem and use _Items.Add method instead of CreateItem (I’ve never tried CreateItem(olPostItem) though). So, if anyone has comments on that please speak up :-)
Posted 23 Oct, 2004 14:49:58 Top