![]() |
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. |
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. |
All times are GMT +1. The time now is 08:35 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-2006 OutlookBanter.com