Sue, any luck testing the SORT. See thread.

M

Mark

HI Sue,
Below is my Outlook version.
Microsoft Outlook 2000 SP-3 (9.0.0.6627)
I have run into this in the past but have not had time to
investigate it until now. Thanks for your help.
Mark
-----Original Message-----
Outlook version and build #? I'll see if I can duplicate the issue here.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



I do get the same result if I use For Each. [Name] is
defined in the folder and the data is visible when that
field is used as a column in the folder view.
Thanks, Mark
-----Original Message-----
Do you get the same result if you use a For Each ...
Next
loop instead of
for i = 1 to pItems.count?

Is [Name] a field defined on the folder, i.e. one whose data is visible in a
folder view?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Here is the entire subroutine. There are 4 items
that
get
returned as pItems, 2 Active and 2 Listed.

sub loadCombobox()
dim pFolder,pItems,i,mCtl
' on error resume next
set pFolder = ParentFolder.folders("Ops")
set mCtl = Item.GetInspector.ModifiedFormPages
("Marketing").controls("cboPropertyName")
set pItems = pFolder.items.restrict("[Op Status]
= 'Active' OR [Op Status] = 'Listed'")
pItems.Sort "[Name]", False
for i = 1 to pItems.count
mCtl.additem pItems(i).UserProperties.find("Name")
next
set mCtl = nothing
set pItems = nothing
set pFolder = nothing
end sub
-----Original Message-----
That should work, assuming that Name is a field defined
in the folder, not
just in individual items. Could you show a little
more
of
your code?


message
Hello, I am loading a combobox control with values read
fm
another folder and the values always seem to load in
alphabetical order by subject. I would like to sort
them
by a user defined field first, then load them.
Here
is
the code I am using to sort but the data still
sorts
by
subject. pItems is my collection from the folder I am
reading the data from.
pItems.Sort "[Name]", False
Thank you in advance for your help.
 
Top