none
creating a view with custom properties Outlook 2010"user RRS feed

  • Question

  • Hi All,

    I have created a form region for contacts. I have added about 30 properties to the form region. Everything works fine with storing and retrieving the properties programmatically.

    So now I want to manually customize my view. I open the columns dialog and select "user-defined fields in folder" and a scroll down and I notice about 70 percent of my fields are available for selection, but some of the fields are missing.

    What do I have to do to get those user defined properties to appear in the column selection dialog? Did I miss something when I designed the form region? I prefer to do this programatically if possible. Some of the users that will use this contact form are not experienced users.

    Thanks,
    Tom

    Friday, April 20, 2012 2:41 PM

All replies

  • User properties are added to the folder fields when you set the AddToFolderFields Boolean argument to true in UserProperties.Add(). Unless the UserProperty is added to the folder fields you can't use it in a view.
     
    If you're using Extended MAPI or Redemption you can add the property to the FolderFields. In Redemption you would use the RDOFolder.FolderFields.Add() method to add an existing field. You'd need to supply the name, type, GUID and display format.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Thomas Lee3" <=?utf-8?B?VGhvbWFzIExlZTM=?=> wrote in message news:3f107a8c-a0a9-4903-b546-af7592587e15...

    Hi All,

    I have created a form region for contacts. I have added about 30 properties to the form region. Everything works fine with storing and retrieving the properties programmatically.

    So now I want to manually customize my view. I open the columns dialog and select "user-defined fields in folder" and a scroll down and I notice about 70 percent of my fields are available for selection, but some of the fields are missing.

    What do I have to do to get those user defined properties to appear in the column selection dialog? Did I miss something when I designed the form region? I prefer to do this programatically if possible. Some of the users that will use this contact form are not experienced users.

    Thanks,
    Tom


    Ken Slovak MVP - Outlook
    Friday, April 20, 2012 2:50 PM
    Moderator
  • check this link this may help you out

    http://social.technet.microsoft.com/Forums/en-US/officesetupdeploy/thread/57bb5938-1740-458e-b998-99a4f92fe7c8

    Saturday, April 21, 2012 12:35 PM
  • Hi Ken,

    Adding the parameters seems to work well for the first 18 additional parameters. However after that I get an error 0x80020009 for every additional user parameter I try to add. I am calling the Add method for the User property. If I look at the user defined fields all of the parameters were added except obviously the ones that returned an error.

    I have about 40 parameters to add and only about 18 are visible.

    Any clues?

    Thanks,

    Tom

    Wednesday, April 25, 2012 4:57 PM
  • UserProperties are added to PS_PUBLIC_STRINGS, along with any MAPI named properties explicitly added to that namespace. There's a 32K limit for data in that namespace, is it possible that the limit has been exceeded?
     
    Unfortunately, DISP_E_EXCEPTION (0x80020009) is not a very informative error.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Thomas Lee3" <=?utf-8?B?VGhvbWFzIExlZTM=?=> wrote in message news:d099a916-e88c-48f8-bb3c-c586dfc9a444...

    Hi Ken,

    Adding the parameters seems to work well for the first 18 additional parameters. However after that I get an error 0x80020009 for every additional user parameter I try to add. I am calling the Add method for the User property. If I look at the user defined fields all of the parameters were added except obviously the ones that returned an error.

    I have about 40 parameters to add and only about 18 are visible.

    Any clues?

    Thanks,

    Tom


    Ken Slovak MVP - Outlook
    Wednesday, April 25, 2012 6:23 PM
    Moderator
  • I would not believe it has exceeded 32K. We are not saving any lengthy memos. I would say pretty much we are saving 40 strings that will hold a value of anywhere from about 20 characters to about 100 characters.

    Is there a way I can do this through extended MAPI guaranteeing that all forty properties will be added?

    BTW - I tried changing the order of the parameters and that does not seem to matter.

    Wednesday, April 25, 2012 6:56 PM
  • You can use Extended MAPI to create user properties and/or named properties, but if you are hitting a limit you will face the same problem.
     
    I'm wondering if you're using Exchange server. There are problems due to too many properties being added to stores as distinct from the 32K namespace limit.
     
     
    I once ran into the problem on an EX2003 server where I was playing with adding x-headers using Redemption, and after a series of projects that used custom forms and various user properties. I had to go into my server and clean out the database for things to go back to normal.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Thomas Lee3" <=?utf-8?B?VGhvbWFzIExlZTM=?=> wrote in message news:d0315f81-25bf-4e3d-a37d-a4343b5c3a36...

    I would not believe it has exceeded 32K. We are not saving any lengthy memos. I would say pretty much we are saving 40 strings that will hold a value of anywhere from about 20 characters to about 100 characters.

    Is there a way I can do this through extended MAPI guaranteeing that all forty properties will be added?

    BTW - I tried changing the order of the parameters and that does not seem to matter.


    Ken Slovak MVP - Outlook
    Thursday, April 26, 2012 2:13 PM
    Moderator
  • Good morning Ken,

    I am running exchange server 2007 and so is my customer. We both get the same error and the same amount of parameters added.

    I did go to my Exchange server and increase the limit from 8K to 16K as the procedure indicated. Still got the exact same issue.

    I don't believe this is an Exchange Server issue....however I have been wrong before. My customer is running Exchange Server from Rackspace.

    Thanks for the idea though.

    Thursday, April 26, 2012 3:05 PM
  • More information. A slight clue.

    Interestingly I am able to Add additional parameters using outlook spy. So I think it could be one of two things

    1. I am adding the user properties via ContactItem object (querying user properties through proper methods) and I should be going directly to the folder.

    2. I should be using Extended MAPI.

    So I think this is a couple items to experiment with.

    Thursday, April 26, 2012 3:33 PM
  • Those are about the only things I can think of. I asked Dmitry to look in on this thread to see if I might have missed something, he's my MAPI go-to guy :)

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Thomas Lee3" <=?utf-8?B?VGhvbWFzIExlZTM=?=> wrote in message news:0bae04c5-8568-401f-95ec-71958bccf33e...

    Good morning Ken,

    I am running exchange server 2007 and so is my customer. We both get the same error and the same amount of parameters added.

    I did go to my Exchange server and increase the limit from 8K to 16K as the procedure indicated. Still got the exact same issue.

    I don't believe this is an Exchange Server issue....however I have been wrong before. My customer is running Exchange Server from Rackspace.

    Thanks for the idea though.


    Ken Slovak MVP - Outlook
    Thursday, April 26, 2012 3:34 PM
    Moderator
  • Are you sure you did not previously add properties with the same name but different type?

    Are you adding folder fields or just setting the named MAPI properties in an IMessage window in OutlookSpy?

    

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.3 is now available!

    Thursday, April 26, 2012 7:35 PM
  • Also, does the following Redemption scripts works from Outlook Spy (click Script, replace the folder fields names with the ones you are using)?

      set Session = CreateObject("Redemption.RDOSession")
      Session.MAPIOBJECT = Application.Session.MAPIOBJECT
      set Folder = Session.GetFolderFromID(Application.ActiveExplorer.CurrentFolder.EntryID)
      set FolderFields = Folder.FolderFields
      set Field = FolderFields.Add("Redemption Text Prop")
      set Field = FolderFields.Add("Redemption Percent Prop", &HD, ,2) 'olPercent, 2 decimals
      set Field = FolderFields.Add("Redemption Number Prop", &HC, ,3) 'olNumber, 2 decimals
      FolderFields.Save


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.3 is now available!

    Thursday, April 26, 2012 7:45 PM
  • Problem solved.

    I feel a little bit stupid. The problem was that some of my user variable names contained an underscore. I switched all of those to a hyphens and guess what? It worked.

    Thank you all for you time.

    Thursday, April 26, 2012 8:18 PM