Out of Memory

C

chris

I get the following message when I try to save a Mailitem using the
SaveAs method:

"There is not enough free memory to run this program. Quit one or more
programs, and then try again.".

The problem is I have a huge amount of memory and I am not likely to
run out. This (2M RAM, 100's of Gigs in free hard disk space), coupled
with 2 Processors and the system is extremely fast.

I have had a look to see if the application has poor memory management
i.e releasing objects, but it all seems to be in order.

When I debug and get to the SaveAs statement Outlook suddenly work
overtime for about 5 Seconds and then Throws the exception.

Any ideas?
Could this be the structure of the mail itself? Number of Addresses
to/From?

I do notice that the Error number is Also different each time. Anyone
know why this is?

My code looks something similar to this:

Dim oMailItem as Outlook.MailItem
Set oMailItem = oOutlook.ActiveInspector.CurrentItem

oMailItem.SaveAs strFileName 'Throws the error HERE

set oMailItem = Nothing


Any help would be good.

Thanks in Advance,

Chris
 
Top