![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#3
|
|||
|
|||
![]()
Hi Ken, thanks for the reply.
The point of the loop is to convert Outlook Contacts objects to My Custom Contact Objects so it doesn't make sense to declare NewCont outside the loop. Maybe I'm mis-understanding you? I've seen similar suggestions in other forum posts and it seems like a cross your fingers and hope solution which doesn't make me feel very comfortable. It seems like there should be a reliable way of "closing" objects that you open. Am I missing something? Thanks, Mike D. "Ken Slovak - [MVP - Outlook]" wrote: Declare NewCont outside the loop so you aren't creating an instance of it each pass through the loop. Set both contact objects to null, if that's not enough to prevent the error then call Marshal.ReleaseComObject() on them. If that's not enough then call the GC and WaitForPendingFinalizers(). Do it in steps so you don't add more handling than the minimum needed. Using ReleaseComObject() and the garbage collection is expensive. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Limited number of columns | Pavel | Outlook - Calandaring | 0 | July 8th 08 05:34 PM |
Your server administrator has limited the number of items you can | Johan Verrept | Outlook and VBA | 3 | March 13th 08 03:57 PM |
Your server administrator has limited the number of items you can | Johan Verrept | Add-ins for Outlook | 3 | March 13th 08 03:57 PM |
When exporting Outlook 2007 Contacts inly a limited number go. | mcfarmer | Outlook - Using Contacts | 2 | October 26th 07 09:01 PM |
You server administrator has limited ... | Brian Ross | Outlook - General Queries | 1 | April 10th 07 02:07 PM |