I'm trying to iterate through a few hundred contacts item on a PF (Exchange
2003 running on Windows Server 2003 and OL XP SP2) but everytime I select
too many contacts, the application fails with: Run-time error
'-1456455675(a9304005)';.
This VBA code works fine with around 100 contacts or less. I've tried the
same thing with a VB 6.0 app and the result is the same.
I wondering if there's a limitation of memory or something that does not
allow me to get the count of a couple of hundreds contact records?
Dim myolapp As Outlook.Application
Set myolapp = CreateObject("Outlook.Application")
Dim NS As Outlook.NameSpace
Set NS = myolapp.GetNamespace("MAPI")
Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection
Dim myItems As Outlook.Items
Dim AllPublicFolders As MAPIFolder
Dim myFolder As Outlook.Folders
Dim myContact As ContactItem
Set myOlExp = myolapp.ActiveExplorer
Set myOlSel = myOlExp.Selection
MsgBox myOlSel.Count
Thanks,
Rafael
Tom Rizzo [MSFT] - 13 Jul 2004 04:18 GMT
I believe the selection collection is limited in the number of items you can
select. Can't remember the limit right now but 100's may be too much for
it.
Tom

Signature
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
> I'm trying to iterate through a few hundred contacts item on a PF (Exchange
> 2003 running on Windows Server 2003 and OL XP SP2) but everytime I select
[quoted text clipped - 26 lines]
>
> Rafael