You might try running Recipients.ResolveAll before you try to save.
I can't imagine what the purpose of your approach is, though.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"toni santa" wrote in message ...
Hi,
when saving a mail with a lot of recipients I receive an 'out of memory'
error. OL2003. Is this a bug of MAPI implemented by OL? See (nonsens)code
below to reproduce it.
best regards
Toni
Sub mailtest()
Dim myItem As MailItem
Set myolapp = CreateObject("Outlook.Application")
Set myItem = myolapp.CreateItem(olMailItem)
For i = 1 To 2300
Set myRecipient = myItem.Recipients.Add("[smtp:santaxf@dnetxxyyzz" &
i & ".com]")
Next
myItem.Display
myItem.SaveAs "c:\temp\test.msg", olMSG
End Sub