View Single Post
  #1  
Old December 6th 06, 04:23 PM posted to microsoft.public.outlook.program_vba
toni santa
external usenet poster
 
Posts: 3
Default Problem with saving a mail with a lot of recipients

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


Ads