Re: Limitation with ActiveExplorer Selection?
From: Rafael (rafael1119_at_hotmail.com)
Date: 07/26/04
- Previous message: Bryan Dickerson: "Re: Outlook shortcut"
- In reply to: Ken Slovak - [MVP - Outlook]: "Re: Limitation with ActiveExplorer Selection?"
- Next in thread: Ken Slovak - [MVP - Outlook]: "Re: Limitation with ActiveExplorer Selection?"
- Reply: Ken Slovak - [MVP - Outlook]: "Re: Limitation with ActiveExplorer Selection?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 26 Jul 2004 12:52:01 -0400
Ken - Group,
BTW: I have a Windows XP SP1+ PC with 512 MB of RAM running on a P4 2Ghtz
The problem occurs with both my VB application and when I use VBA.
If any of you have a CDO code I to get the count at least I would like to
try it and see how that works. The other variable I want throw in the mix
is the fact that I am using custom Oulook forms for my contacts on the
Public Folders.
Thanks for your help on this issue.
Rafael
"Ken Slovak - [MVP - Outlook]" <kenslovak@mvps.org> wrote in message
news:%23AC62BybEHA.556@tk2msftngp13.phx.gbl...
> There are a lot of factors involved, such as system resources and overall
> RAM and virtual memory size. I've seen loops that worked correctly on my
dev
> machines cause out of memory errors on client's machines because of that.
> There's a long-standing bug in how Outlook handles iterating collections
of
> items in loops. It creates internal variables that aren't released until
> after the procedure exits and it gets worse the more dot operators you
use,
> since Outlook creates internal variables for each suboperator in the dots.
> That's why using CDO 1.21 code works for loops like that, it doesn't
create
> those internal variables and can handle looping over much larger
collections
> than Outlook code can.
>
> As far as specific limits on Selection, there aren't any hard and fast
> rules. It just seems to break at some point.
>
> --
> 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
>
>
> "John Riddle" <JohnRiddle@discussions.microsoft.com> wrote in message
> news:57012B59-C5DD-4FC7-9B30-ED028B05E58E@microsoft.com...
> > In my version of Outlook (2003), when I select a large number of items
for
> processing, I generally run into memory problems after a couple hundred or
> so. However, I can very easily select several thousand and get a count
> (Selection.Count). I can't understand at all why he would be having a
> problem with that.
> >
> > Also, even if I only select a few dozen at a time and loop through them
> with a For...Next loop such as:
> >
> > Dim candFolder As MAPIFolder
> > Set candFolder = Application.ActiveExplorer.CurrentFolder
> > If candFolder.DefaultItemType = olContactItem Then
> > strJobTitle = "Manager"
> > strDepartment = "IT"
> > For Each cand In Application.ActiveExplorer.Selection
> > cand.JobTitle = strJobTitle
> > cand.Department = strDepartment
> > cand.Save
> > Set cand = Nothing
> > Next
> > strJobTitle = ""
> > strDepartment = ""
> > End If
> > Set candFolder = Nothing
> >
> > This code produces "Out of memory." errors if more than a couple hundred
> items are selected AND oddly enough, if I select only a couple dozen and
> process them, then select a couple dozen different items and process them
> and so on in stages like this, I still get memory errors after a few
> hundred. I'm convinced that processing items using the Selection
collection
> has memory problems.
> >
> > Can you re-create this scenario Ken?
> >
> > John
>
>
- Previous message: Bryan Dickerson: "Re: Outlook shortcut"
- In reply to: Ken Slovak - [MVP - Outlook]: "Re: Limitation with ActiveExplorer Selection?"
- Next in thread: Ken Slovak - [MVP - Outlook]: "Re: Limitation with ActiveExplorer Selection?"
- Reply: Ken Slovak - [MVP - Outlook]: "Re: Limitation with ActiveExplorer Selection?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|