Well, I've seen results similar to that when I restricted on properties that
weren't there in all items, Unfortunately you can't really do something like
you can in MAPI or Redemption code where you can set a filter or restriction
on a property existing and having a certain value.
I'd try an experiment of forcing a null string as the value of the fax
fields in every item that doesn't have a value in those fields and then try
the restriction again.

Signature
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
>> Some of those properties may not exist on the items if they were never
>> initialized with a value. That's probably why you aren't getting any
[quoted text clipped - 9 lines]
>
> Dave
Dave Townsend - 27 Jan 2005 16:53 GMT
> Well, I've seen results similar to that when I restricted on properties
> that weren't there in all items, Unfortunately you can't really do
[quoted text clipped - 4 lines]
> fields in every item that doesn't have a value in those fields and then
> try the restriction again.
You're right, it appears to be a problem with the fax numbers never
having been assigned anything before. Trouble is, that makes my use of
restrict pointless. The reason for restrict is so I don't have to
retrieve every item to check it matches what I look for. If I have to
retrieve every item to assign a blank string to the fax number then I
may as well just do my tests and ignore restrict.
Microsoft do like to make things easy on us don't they!
Thanks for your help.
Dave
Ken Slovak - 28 Jan 2005 15:00 GMT
If you can use Extended MAPI or are using Redemption to avoid the security
restrictions you can use a MAPI table filter or restriction and that can use
RestrictionExist as a condition for a property and has the added bonus of
running about 5 - 10 orders of magnitude faster than an Outlook restriction
or filter.
Using Redemption I'd create a RestrictionAnd, add a RestrictionExist for
that property to the RestrictionAnd and then add a RestrictionContent for
the value I wanted. For more than one property I'd create a RestrictionOr
and add a set of RestrictionAnd's with the RestrictionExist and
RestrictionContent for each property I wanted to qualify for the
restriction.
If I wanted to get the items from the rows of the resulting filtered
MAPITable I'd include the EntryID of the item in the row and use
NameSpace.GetItemFromID to get items I wanted to change (results of the
MAPITable.Filter are read-only from the table).

Signature
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
>> Well, I've seen results similar to that when I restricted on properties
>> that weren't there in all items, Unfortunately you can't really do
[quoted text clipped - 17 lines]
>
> Dave