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

Create and Get user-defined fields in folder



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 10th 08, 11:10 AM posted to microsoft.public.outlook.program_addins
CK
external usenet poster
 
Posts: 33
Default Create and Get user-defined fields in folder

Hi,

I have a COM add-in created using VB6. I need to create user-defined fields
in one of the contact folder and get the user-defined fields value for usage
later.

Does anyone know how to create user-defined fields on contact folder and
retrieve the created user-defined fields value?

Thanks!

ck

Ads
  #2  
Old January 10th 08, 03:58 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Create and Get user-defined fields in folder

Do you want the properties on the folder object itself or on items in the
folder? Folder properties would have to be created using something like
Extended MAPI or Redemption or CDO 1.21. For user properties on items just
add the user property to an item and set the add to folder fields argument.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"ck" wrote in message
...
Hi,

I have a COM add-in created using VB6. I need to create user-defined
fields
in one of the contact folder and get the user-defined fields value for
usage
later.

Does anyone know how to create user-defined fields on contact folder and
retrieve the created user-defined fields value?

Thanks!

ck


  #3  
Old January 11th 08, 02:35 AM posted to microsoft.public.outlook.program_addins
CK
external usenet poster
 
Posts: 33
Default Create and Get user-defined fields in folder

Hi Ken,
Thanks for the reply. i need to add and get the properties in the folder
object. Actually i do manage to add properties to folder object using this
piece of code:

Set objContact = objNewFolder.Items.Add(olContactItem)
Set OlUserProperty = objContact.UserProperties.Add("GroupID", olNumber)
objContact.Save

BUT by doing this, i will need to add the contact item to the folder. I just
want the properties to be in folder object.

So, how to achieve this using Redemption or CDO 1.21? Any website/sample
that i can go through?


"Ken Slovak - [MVP - Outlook]" wrote:

Do you want the properties on the folder object itself or on items in the
folder? Folder properties would have to be created using something like
Extended MAPI or Redemption or CDO 1.21. For user properties on items just
add the user property to an item and set the add to folder fields argument.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"ck" wrote in message
...
Hi,

I have a COM add-in created using VB6. I need to create user-defined
fields
in one of the contact folder and get the user-defined fields value for
usage
later.

Does anyone know how to create user-defined fields on contact folder and
retrieve the created user-defined fields value?

Thanks!

ck



  #4  
Old January 11th 08, 02:39 AM posted to microsoft.public.outlook.program_addins
CK
external usenet poster
 
Posts: 33
Default Create and Get user-defined fields in folder

Hi Ken,
Thanks for the reply. i need to add and get the properties in the folder
object. Actually i do manage to add properties to folder object using this
piece of code:

Set objContact = objNewFolder.Items.Add(olContactItem)
Set OlUserProperty = objContact.UserProperties.Add("GroupID", olNumber)
objContact.Save

BUT by doing this, i will need to add the contact item to the folder. I just
want the properties to be in folder object.

So, how to achieve this using Redemption or CDO 1.21? Any website/sample
that i can go through?

"Ken Slovak - [MVP - Outlook]" wrote:

Do you want the properties on the folder object itself or on items in the
folder? Folder properties would have to be created using something like
Extended MAPI or Redemption or CDO 1.21. For user properties on items just
add the user property to an item and set the add to folder fields argument.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"ck" wrote in message
...
Hi,

I have a COM add-in created using VB6. I need to create user-defined
fields
in one of the contact folder and get the user-defined fields value for
usage
later.

Does anyone know how to create user-defined fields on contact folder and
retrieve the created user-defined fields value?

Thanks!

ck



  #5  
Old January 11th 08, 02:44 AM posted to microsoft.public.outlook.program_addins
CK
external usenet poster
 
Posts: 33
Default Create and Get user-defined fields in folder


Hi Ken,
Thanks for the reply. i need to add and get the properties in the folder
object. Actually i do manage to add properties to folder object using this
piece of code:

Set objContact = objNewFolder.Items.Add(olContactItem)
Set OlUserProperty = objContact.UserProperties.Add("GroupID", olNumber)
objContact.Save

BUT by doing this, i will need to add the contact item to the folder. I just
want the properties to be in folder object.

So, how to achieve this using Redemption or CDO 1.21? Any website/sample
that i can go through?
"Ken Slovak - [MVP - Outlook]" wrote:

Do you want the properties on the folder object itself or on items in the
folder? Folder properties would have to be created using something like
Extended MAPI or Redemption or CDO 1.21. For user properties on items just
add the user property to an item and set the add to folder fields argument.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"ck" wrote in message
...
Hi,

I have a COM add-in created using VB6. I need to create user-defined
fields
in one of the contact folder and get the user-defined fields value for
usage
later.

Does anyone know how to create user-defined fields on contact folder and
retrieve the created user-defined fields value?

Thanks!

ck



  #6  
Old January 11th 08, 04:34 AM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Create and Get user-defined fields in folder

You don't need to save the item. It is enough that you created it in the folder and added a property to it. Just call Set objContact = Nothing when you're done with it.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"ck" wrote in message news
Hi Ken,
Thanks for the reply. i need to add and get the properties in the folder
object. Actually i do manage to add properties to folder object using this
piece of code:

Set objContact = objNewFolder.Items.Add(olContactItem)
Set OlUserProperty = objContact.UserProperties.Add("GroupID", olNumber)
objContact.Save

BUT by doing this, i will need to add the contact item to the folder. I just
want the properties to be in folder object.

So, how to achieve this using Redemption or CDO 1.21? Any website/sample
that i can go through?


"Ken Slovak - [MVP - Outlook]" wrote:

Do you want the properties on the folder object itself or on items in the
folder? Folder properties would have to be created using something like
Extended MAPI or Redemption or CDO 1.21. For user properties on items just
add the user property to an item and set the add to folder fields argument.

"ck" wrote in message
...
Hi,

I have a COM add-in created using VB6. I need to create user-defined
fields
in one of the contact folder and get the user-defined fields value for
usage
later.

Does anyone know how to create user-defined fields on contact folder and
retrieve the created user-defined fields value?

Thanks!

ck



  #7  
Old January 11th 08, 05:17 AM posted to microsoft.public.outlook.program_addins
CK
external usenet poster
 
Posts: 33
Default Create and Get user-defined fields in folder

Sue,

Thanks. The property is created in the folder. How to get the property value?



"Sue Mosher [MVP-Outlook]" wrote:

You don't need to save the item. It is enough that you created it in the folder and added a property to it. Just call Set objContact = Nothing when you're done with it.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"ck" wrote in message news
Hi Ken,
Thanks for the reply. i need to add and get the properties in the folder
object. Actually i do manage to add properties to folder object using this
piece of code:

Set objContact = objNewFolder.Items.Add(olContactItem)
Set OlUserProperty = objContact.UserProperties.Add("GroupID", olNumber)
objContact.Save

BUT by doing this, i will need to add the contact item to the folder. I just
want the properties to be in folder object.

So, how to achieve this using Redemption or CDO 1.21? Any website/sample
that i can go through?


"Ken Slovak - [MVP - Outlook]" wrote:

Do you want the properties on the folder object itself or on items in the
folder? Folder properties would have to be created using something like
Extended MAPI or Redemption or CDO 1.21. For user properties on items just
add the user property to an item and set the add to folder fields argument.

"ck" wrote in message
...
Hi,

I have a COM add-in created using VB6. I need to create user-defined
fields
in one of the contact folder and get the user-defined fields value for
usage
later.

Does anyone know how to create user-defined fields on contact folder and
retrieve the created user-defined fields value?

Thanks!

ck




  #8  
Old January 11th 08, 05:27 AM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Create and Get user-defined fields in folder

objContact.UserProperties("GroupID").Value would return the value of the GroupID property on any item to which that property has been added.

However, just because a property is defined in a folder doesn't mean that it exists yet on individual items or, by extension, has any values on those items. The property must be added to each item before a value can be set for it. The property is added automatically if the user assigns the property a value manually through in-cell editing or the All Fields page. Programmatically, your code would need to add the property to the item, then set its value before saving the item.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"ck" wrote in message ...
Sue,

Thanks. The property is created in the folder. How to get the property value?



"Sue Mosher [MVP-Outlook]" wrote:

You don't need to save the item. It is enough that you created it in the folder and added a property to it. Just call Set objContact = Nothing when you're done with it.

"ck" wrote in message news
Hi Ken,
Thanks for the reply. i need to add and get the properties in the folder
object. Actually i do manage to add properties to folder object using this
piece of code:

Set objContact = objNewFolder.Items.Add(olContactItem)
Set OlUserProperty = objContact.UserProperties.Add("GroupID", olNumber)
objContact.Save

BUT by doing this, i will need to add the contact item to the folder. I just
want the properties to be in folder object.

So, how to achieve this using Redemption or CDO 1.21? Any website/sample
that i can go through?


"Ken Slovak - [MVP - Outlook]" wrote:

Do you want the properties on the folder object itself or on items in the
folder? Folder properties would have to be created using something like
Extended MAPI or Redemption or CDO 1.21. For user properties on items just
add the user property to an item and set the add to folder fields argument.

"ck" wrote in message
...
Hi,

I have a COM add-in created using VB6. I need to create user-defined
fields
in one of the contact folder and get the user-defined fields value for
usage
later.

Does anyone know how to create user-defined fields on contact folder and
retrieve the created user-defined fields value?


  #9  
Old January 11th 08, 09:02 AM posted to microsoft.public.outlook.program_addins
CK
external usenet poster
 
Posts: 33
Default Create and Get user-defined fields in folder

No wonder i can't get any value from the property in folder. If i need to
assign the property to item before i can assign any value to the property,
property in item and folder are essentially the same. Then what is the
different between property on folder level and property on item level?

Sorry for all the annoying questions, i am still new to programming in
Outlook.

"Sue Mosher [MVP-Outlook]" wrote:

objContact.UserProperties("GroupID").Value would return the value of the GroupID property on any item to which that property has been added.

However, just because a property is defined in a folder doesn't mean that it exists yet on individual items or, by extension, has any values on those items. The property must be added to each item before a value can be set for it. The property is added automatically if the user assigns the property a value manually through in-cell editing or the All Fields page. Programmatically, your code would need to add the property to the item, then set its value before saving the item.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"ck" wrote in message ...
Sue,

Thanks. The property is created in the folder. How to get the property value?



"Sue Mosher [MVP-Outlook]" wrote:

You don't need to save the item. It is enough that you created it in the folder and added a property to it. Just call Set objContact = Nothing when you're done with it.

"ck" wrote in message news Hi Ken,
Thanks for the reply. i need to add and get the properties in the folder
object. Actually i do manage to add properties to folder object using this
piece of code:

Set objContact = objNewFolder.Items.Add(olContactItem)
Set OlUserProperty = objContact.UserProperties.Add("GroupID", olNumber)
objContact.Save

BUT by doing this, i will need to add the contact item to the folder. I just
want the properties to be in folder object.

So, how to achieve this using Redemption or CDO 1.21? Any website/sample
that i can go through?


"Ken Slovak - [MVP - Outlook]" wrote:

Do you want the properties on the folder object itself or on items in the
folder? Folder properties would have to be created using something like
Extended MAPI or Redemption or CDO 1.21. For user properties on items just
add the user property to an item and set the add to folder fields argument.

"ck" wrote in message
...
Hi,

I have a COM add-in created using VB6. I need to create user-defined
fields
in one of the contact folder and get the user-defined fields value for
usage
later.

Does anyone know how to create user-defined fields on contact folder and
retrieve the created user-defined fields value?


  #10  
Old January 11th 08, 03:21 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Create and Get user-defined fields in folder

I think in almost all cases the store wouldn't let you create named
properties on a folder object. A user defined field in the folder is
probably the best you can do.

What would probably be a better alternative would be to create a hidden item
in the folder to hold any value or values you want. You can't do that either
with the Outlook object model (before Outlook 2007 where you can create a
"StorageItem". But you can create hidden items in CDO using
Folder.HiddenMessages.Add() and in Redemption using
RDOFolder.HiddenItems.Add().

CDO information is at www.cdolive.com and Redemption information is at
www.dimastr.com/redemption.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"ck" wrote in message
news
Hi Ken,
Thanks for the reply. i need to add and get the properties in the folder
object. Actually i do manage to add properties to folder object using this
piece of code:

Set objContact = objNewFolder.Items.Add(olContactItem)
Set OlUserProperty = objContact.UserProperties.Add("GroupID", olNumber)
objContact.Save

BUT by doing this, i will need to add the contact item to the folder. I
just
want the properties to be in folder object.

So, how to achieve this using Redemption or CDO 1.21? Any website/sample
that i can go through?


"Ken Slovak - [MVP - Outlook]" wrote:

Do you want the properties on the folder object itself or on items in the
folder? Folder properties would have to be created using something like
Extended MAPI or Redemption or CDO 1.21. For user properties on items
just
add the user property to an item and set the add to folder fields
argument.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"ck" wrote in message
...
Hi,

I have a COM add-in created using VB6. I need to create user-defined
fields
in one of the contact folder and get the user-defined fields value for
usage
later.

Does anyone know how to create user-defined fields on contact folder
and
retrieve the created user-defined fields value?

Thanks!

ck




 




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
How to design a custom form that use User defined fields defined on a particular folder (not the default inbox one) Lucas Campos[_2_] Outlook - Using Forms 5 August 17th 07 06:03 PM
How to retrieve User Defined fields defined in an Folder? Lucas Campos[_2_] Outlook - Using Forms 1 August 16th 07 10:32 PM
How to create user-defined fields in Organizational Forms Library folder? [email protected] Add-ins for Outlook 3 March 15th 07 10:07 PM
User-Defined Fields in Folder [email protected] Outlook - Using Contacts 5 November 13th 06 08:59 PM
Outlook Contacts - Converting User-defined Item fields to Folder fields [email protected] Outlook - Using Contacts 1 September 29th 06 10:17 PM


All times are GMT +1. The time now is 08:20 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.