We need to create a distribution list in Outlook from a VBScript.
When the number of email addresses to add in the list is small (<90), everytihing is working well.
But when this number approaches 100, we get an error 80004004 and the process is aborted.
According to our tests, the number of addresses from which we have an error is not fixed.
And it seems the error is more related to the total size (in character) of the whole list than to the number of addresses we try to put in this list.
This is the code used to create the list:
Dim myOlApp, myDistList, myMailItem, myRecipients
Set myOlApp = WScript.CreateObject("Outlook.Application")
Set myDistList = myOlApp.CreateItem(7)
myDistList.DLName = InputBox("Enter the name of the new distribution list.")
Set myMailItem = myOlApp.CreateItem(0)
Set myRecipients = myMailItem.Recipients
The error is occuring on the "myDistList.Save" instruction.
Do you have any idee of how to avoid this error?
For your info, the script is generated/downloaded from a JSP page.
Many thanks in advance for your help.