Re: Searching through Items with created Property (DisplayFormat = FALSE)

From: Ken Slovak - [MVP - Outlook] (kenslovak_at_mvps.org)
Date: 05/06/04


Date: Thu, 6 May 2004 10:05:38 -0400

You cannot use Restrict or Find unless the field has been added to the
folder fields, and even if it has it might not have been initialized to a
value in which case it might not actually exist in a specific item. That's
how MAPI handles user properties, it doesn't actually create them in an item
until they have a value. So when I add a field that I might want to restrict
on I always initialize it to a default value.

False is not a valid value for DisplayFormat. What you are doing by using
False is implicitly using the value of False being 0 in VB/VBA. However,
that may not be correct in another language, so it's bad programming
practice. It's also not listed as a valid setting for the DisplayFormat
argument. Look in the Object Browser for UserProperties.Add and see what the
valid values are for the arguments of that method.

AddToFolders is the argument that controls whether it's added to the folder,
the DisplayFormat argument is used to set how the field is displayed in the
UI.

I would add the field to the folder and initialize it to a default value
when it's added. That way it can be used in a restriction.

Your posting interface doesn't include any of the preceding thread. Please
do so manually so the thread can be followed.

-- 
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Ryan Hubbard" <ryanmhuc@yahoo.com> wrote in message
news:%23djg0XsMEHA.1032@tk2msftngp13.phx.gbl...
>
> Hey Ken,
>   I believe you answered my question.  What I was doing was adding a
> user property but using the DisplayFormat = false.  All that does is not
> add it to the list of "User Defined Fields in Folder" but the property
> still exists.
>
> example:
> UserProperties.add <NAME>, <TYPE>, <ADDTOFOLDERS>, <DISPLAYFORMAT>
>
> objTask.UserProperties.Add "test", olText, ,False
>
> I was wondering if there was some type of restrict or find that would
> search these type of fields.  I know I can enumerate throught them but
> potentially there could be a couple thousand items so I know using vba
> to do that I will run into performance issues.  I was hoping there was a
> faster way already implemented.
>
> Thanks ken for the reply,
>    Ryan
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!


Relevant Pages

  • Securing a standalone workstation
    ... Documents folder. ... but to fully acheive this hiding breaks the applications on ... to Windows Explorer that let you restrict drive access? ...
    (microsoft.public.security)
  • Re: Deny _WRITE_ access to a file
    ... >> script runs as BUILTIN\SYSTEM). ... to try to go the "extra mile" and "really" restrict the things. ... So any other folder (for example, those hanging from C: ... >The explicit DENY will generally override the ALLOW. ...
    (microsoft.public.windows.server.security)
  • Re: Deny _WRITE_ access to a file
    ... >> script runs as BUILTIN\SYSTEM). ... to try to go the "extra mile" and "really" restrict the things. ... So any other folder (for example, those hanging from C: ... >The explicit DENY will generally override the ALLOW. ...
    (microsoft.public.security)
  • Re: Deny _WRITE_ access to a file
    ... >> script runs as BUILTIN\SYSTEM). ... to try to go the "extra mile" and "really" restrict the things. ... So any other folder (for example, those hanging from C: ... >The explicit DENY will generally override the ALLOW. ...
    (microsoft.public.win2000.security)
  • Re: Domain controller policy not acessable
    ... Windows Platform Support Team ... > identifier allocator failed to initialize properly. ... > default domain policy and the other is default domain ctrl ... >>The sub folder are adm,machine and user for both. ...
    (microsoft.public.win2000.active_directory)