Ken, thanks so much for the quick reply. No, that syntax for the sort
command does not work. Actually that is the way I first coded it.
When I got the error message I thought pershaps the braces were not
needed since the help information states "they may be used". So I took
them off.
Your comment is well taken about looking at the Object Browser since
that was the first place we notice the "sort" method applies to
AddressEntries. The MSDN site has a help page on this that is just as
brief as the regular help page and makes a comment about the different
syntax for sort as it applies to AddressEntries. But there is no
sample code for this and so after much searching we dropped the post
here.
My guess is there is something special that must be done to allow the
sort to work. Since the object is calling the MAPI TableSort somewhere
along the line in this code the underlying object has become distorted.
But the only thing we are doing is assigned the entries to an object,
and calling sort. Can the assignment throw things off? If so, then
how do you sort the AddressEntries?
Any help is appreciated.
Bernie
I can't make it work here at all either. I've been informed that on a MAPI
level many address book providers don't implement things like sort and it
looks like that's what we're running into here even though it's documented.
I don't have a good alternate solution other than by using CDO or Extended
MAPI or Redemption (www.dimastr.com/redemption). You should be able to sort
or even do a type-ahead lookup type search using the later 2 API's and sort
using CDO (I haven't tested this here though).

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
> Ken, thanks so much for the quick reply. No, that syntax for the sort
> command does not work. Actually that is the way I first coded it.
[quoted text clipped - 20 lines]
>
> Bernie
Bernie - 18 Dec 2005 00:46 GMT
Ken, thanks for the really thoughtful input. I am impressed you
actually ran the code....thanks so much for doing that and confirming
what we experienced.
Your efforts are greatly appreciated.
We were just trying to create some Visual Basic for Application (VBA)
code to help with some of our processes here. Not having a sort
function just slows things down a bit but right now our database is not
so large that we can't wait for it to finish. We actually will run the
programs only a couple of times a month so what we have is probably
"good enough".
We'll take a look at the this "Redemption" thing, it has shown up in a
couple of searches we did on the subject.
I can't tell you enough how much we appreicate you time to look into
this for us.
Hope you and your family have a great Christmas.
Bernie