R
Rafael
All,
I have an Outlook 2003 SP3 with Exchange 2003 Sp1 environment and I've
noticed there's a limitation to the number of contacts I can create or update
programmatically. The magic number seems to be between 244 and 248.
I need to tell as well that I have a custom form for the contacts but this
does not seem to be a problem on my lab where I am running Outlook 2003 SP3
in stand alone mode. I can edit create/edit thousands of contacts using the
same custom form.
I've also increased the cache size on both sides but in stand alone mode,
Outlook worked fine even with the 2048 cache size.
Any thoughts would be appreciated. Here is the code I use to create a bunch
of contacts. This code fails every 24+ contacts.
Sub CreateContacts()
Dim myOlApp As New Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myFolder
Dim myContact As Outlook.ContactItem
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
myName = 0
Do Until myName = 500
Set myContact = myOlApp.CreateItem(olContactItem)
myContact.BusinessAddressState = "WA"
myContact.FullName = "User" & myName
myContact.Email1Address = myContact.FullName & "@mydomain.com"
myName = myName + 1
myContact.Save
Loop
MsgBox myName & " were created."
Set myNameSpace = Nothing
Set myOlApp = Nothing
Set myFolder = Nothing
End Sub
I have an Outlook 2003 SP3 with Exchange 2003 Sp1 environment and I've
noticed there's a limitation to the number of contacts I can create or update
programmatically. The magic number seems to be between 244 and 248.
I need to tell as well that I have a custom form for the contacts but this
does not seem to be a problem on my lab where I am running Outlook 2003 SP3
in stand alone mode. I can edit create/edit thousands of contacts using the
same custom form.
I've also increased the cache size on both sides but in stand alone mode,
Outlook worked fine even with the 2048 cache size.
Any thoughts would be appreciated. Here is the code I use to create a bunch
of contacts. This code fails every 24+ contacts.
Sub CreateContacts()
Dim myOlApp As New Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myFolder
Dim myContact As Outlook.ContactItem
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
myName = 0
Do Until myName = 500
Set myContact = myOlApp.CreateItem(olContactItem)
myContact.BusinessAddressState = "WA"
myContact.FullName = "User" & myName
myContact.Email1Address = myContact.FullName & "@mydomain.com"
myName = myName + 1
myContact.Save
Loop
MsgBox myName & " were created."
Set myNameSpace = Nothing
Set myOlApp = Nothing
Set myFolder = Nothing
End Sub