A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Memory with MailItem.Send



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 25th 09, 04:35 PM posted to microsoft.public.outlook.program_vba
Nathan
external usenet poster
 
Posts: 30
Default Memory with MailItem.Send

I'm sending all the messages contained in a particular folder when Outlook
launches. This can be as many as 500 messages.

Watching Outlook.exe in task manager, as each message is sent, the Mem Usage
slowly balloons from 24MB at start to 116MB just before crashing.

I have tried many different ways of setting my MailItem instances to
Nothing. I've also tried moving the sending code to a seperate Sub in the
hopes that garbage collection would release each MailItem from memory after
being sent. Nothing has worked.

What is the correct way to use VBA to sent a MailItem and then release it
from memory before sending the next?

I can post my code if that'll help, but I'm hoping this situation has come
up before and there is a simple solution that I've been unable to find.

Thanks for any feedback.
  #2  
Old June 25th 09, 05:24 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Memory with MailItem.Send



See if this helps:
http://www.vboffice.net/sample.html?...cmd=showite m

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


Am Thu, 25 Jun 2009 07:35:02 -0700 schrieb Nathan:

I'm sending all the messages contained in a particular folder when Outlook
launches. This can be as many as 500 messages.

Watching Outlook.exe in task manager, as each message is sent, the Mem

Usage
slowly balloons from 24MB at start to 116MB just before crashing.

I have tried many different ways of setting my MailItem instances to
Nothing. I've also tried moving the sending code to a seperate Sub in the
hopes that garbage collection would release each MailItem from memory

after
being sent. Nothing has worked.

What is the correct way to use VBA to sent a MailItem and then release it
from memory before sending the next?

I can post my code if that'll help, but I'm hoping this situation has come
up before and there is a simple solution that I've been unable to find.

Thanks for any feedback.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception thrown on MailItem.Send bstrum Add-ins for Outlook 3 June 5th 07 04:54 PM
Automate Spell Check on MailItem.Send() ??? Brian McCullough Add-ins for Outlook 1 March 30th 07 03:18 PM
How to obtain the body of a MailItem which has not been saved and just only stayed in memory? IceKettle Add-ins for Outlook 0 November 7th 06 03:24 AM
2 GB of memory over 1 GB of memory free, and outlook complains of being out of memory David Hettel Outlook Express 7 October 18th 06 01:08 PM
Losing handle to MailItem when send donald Add-ins for Outlook 8 February 1st 06 07:09 PM


All times are GMT +1. The time now is 08:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.