![]() |
| 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. |
|
|||||||
| Tags: custom, form, memory, running, while |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
(Outlook 2002 sp3)
I have a vb code in a custom form that run a For ... Next loop to go through form items in a public folder and checking for a Start Date field in the item that falls between a nominated period. Something like - For I to NumItems If DateValue(MyItem(I).UserProperties("StartDate") FromDate AND _ DateValue(MyItem(I).UserProperties("StartDate") ToDate Then ... End If Next However when running the code against a folder having some 70 forms I got an "out of memory or sytsem resources" message. Anyway to change the code to avoid the problem? Thanks Long |
| Ads |
|
#2
|
|||
|
|||
|
Try using a restriction on the Items collection of the folder. Look at the
Object Browser help on Restrict, there's an example of using comparisons on date fields and you can use user properties if they are in the folder and not just the items. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Long Nguyen" wrote in message ... (Outlook 2002 sp3) I have a vb code in a custom form that run a For ... Next loop to go through form items in a public folder and checking for a Start Date field in the item that falls between a nominated period. Something like - For I to NumItems If DateValue(MyItem(I).UserProperties("StartDate") FromDate AND _ DateValue(MyItem(I).UserProperties("StartDate") ToDate Then ... End If Next However when running the code against a folder having some 70 forms I got an "out of memory or sytsem resources" message. Anyway to change the code to avoid the problem? Thanks Long |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Emailing a contact vCard with custom form loses all custom info | Kim | Outlook - Using Contacts | 7 | April 27th 06 01:21 AM |
| How to access custom field in Custom Form by C# | Minh Nguyen | Outlook - Using Forms | 3 | April 24th 06 04:32 PM |
| Running exe's from a custom button??? | Jerry Haynes | Outlook and VBA | 1 | April 24th 06 04:26 PM |
| Cannot programmatically open custom message in custom form | ms | Outlook - Using Forms | 1 | January 20th 06 04:01 PM |
| Running query from Access Form commmand using VBA code | Berny | Outlook and VBA | 4 | January 16th 06 03:12 PM |