Items collection doesn't contain all items

Status
Not open for further replies.
E

escamoteur

Hi,

I found some strange behaviour in Outlook 2007. I tried to itterate through all items of a folder usinf the items property. On the

first time some of the items were missing. Calling the function a second time all items were returned.

After that I tried it using a table and now everything worked fine. Btw. there are only about 30 items in the folder.

Best

Tom
 
D

Dmitry Streblechenko

Do you have a script that exhibits this problem? How do you know tha tsome

items are missing? Can you see them inm Outlook before the script runs?

Dmitry Streblechenko (MVP)

-

"escamoteur" <mail@burkharts.net> wrote in message

news:34DFB3C1-A498-41C9-8BCC-81D6445372D6@microsoft.com...
> Hi,

> I found some strange behaviour in Outlook 2007. I tried to itterate
> through all items of a folder usinf the items property. On the first time
> some of the items were missing. Calling the function a second time all
> items were returned.
> After that I tried it using a table and now everything worked fine. Btw.
> there are only about 30 items in the folder.

> Best
> Tom
 
E

escamoteur

Unfortunately I don't have the code anymore after I changed it to the Table solution. Now it works fine for me.

Yes, I new which Items should be there and always on the first run I got a Null reference exception when trying to access fields of

one of the items returned by

foreach

The second time I called the function this problem did not occur.

I just wondered I somebody else had similiar problems.

Best

Tom

"Dmitry Streblechenko" <dmitry@dimastr.com> schrieb im Newsbeitrag news:O$nzyTXMKHA.4572@TK2MSFTNGP02.phx.gbl...
> Do you have a script that exhibits this problem? How do you know tha tsome items are missing? Can you see them inm Outlook before
> the script runs?

> > Dmitry Streblechenko (MVP)
>

>

>

> -
> "escamoteur" <mail@burkharts.net> wrote in message news:34DFB3C1-A498-41C9-8BCC-81D6445372D6@microsoft.com...
> > Hi,
>

>> I found some strange behaviour in Outlook 2007. I tried to itterate through all items of a folder usinf the items property. On
> > the first time some of the items were missing. Calling the function a second time all items were returned.
> > After that I tried it using a table and now everything worked fine. Btw. there are only about 30 items in the folder.
>

>> Best
> > Tom


>
 
D

Dmitry Streblechenko

Hard to say without seeing the relevant snippet of your code.

Dmitry Streblechenko (MVP)

-

"escamoteur" <mail@burkharts.net> wrote in message

news:8B23D5E9-06FA-4F3F-998B-BC1F6ED5AF4B@microsoft.com...
> Unfortunately I don't have the code anymore after I changed it to the
> Table solution. Now it works fine for me.

> Yes, I new which Items should be there and always on the first run I got a
> Null reference exception when trying to access fields of one of the items
> returned by

> foreach

> The second time I called the function this problem did not occur.
> I just wondered I somebody else had similiar problems.
> Best
> Tom

> "Dmitry Streblechenko" <dmitry@dimastr.com> schrieb im Newsbeitrag
> news:O$nzyTXMKHA.4572@TK2MSFTNGP02.phx.gbl...
> > Do you have a script that exhibits this problem? How do you know tha
> > tsome items are missing? Can you see them inm Outlook before the script
> > runs?
>

>> > > Dmitry Streblechenko (MVP)
> >

> >

> >

> > -
> > "escamoteur" <mail@burkharts.net> wrote in message
> > news:34DFB3C1-A498-41C9-8BCC-81D6445372D6@microsoft.com...
> >> Hi,
> >
>>> I found some strange behaviour in Outlook 2007. I tried to itterate
> >> through all items of a folder usinf the items property. On the first
> >> time some of the items were missing. Calling the function a second time
> >> all items were returned.
> >> After that I tried it using a table and now everything worked fine. Btw.
> >> there are only about 30 items in the folder.
> >
>>> Best
> >> Tom

>

>>

>
 
E

escamoteur

Doesn't matter, If it comes up again I will post a new message

Best

Tom

"Dmitry Streblechenko" <dmitry@dimastr.com> schrieb im Newsbeitrag news:OYmQRGZMKHA.220@TK2MSFTNGP02.phx.gbl...
> Hard to say without seeing the relevant snippet of your code.

> > Dmitry Streblechenko (MVP)
>

>

>

> -
> "escamoteur" <mail@burkharts.net> wrote in message
> news:8B23D5E9-06FA-4F3F-998B-BC1F6ED5AF4B@microsoft.com...
> > Unfortunately I don't have the code anymore after I changed it to the
> > Table solution. Now it works fine for me.
>

>> Yes, I new which Items should be there and always on the first run I got a
> > Null reference exception when trying to access fields of one of the items
> > returned by
>

>> foreach
>

>> The second time I called the function this problem did not occur.
> > I just wondered I somebody else had similiar problems.
> > Best
> > Tom
>

>> "Dmitry Streblechenko" <dmitry@dimastr.com> schrieb im Newsbeitrag
> > news:O$nzyTXMKHA.4572@TK2MSFTNGP02.phx.gbl...
> >> Do you have a script that exhibits this problem? How do you know tha
> >> tsome items are missing? Can you see them inm Outlook before the script
> >> runs?
> >
>>> > >> Dmitry Streblechenko (MVP)
> >>

> >>

> >>

> >> -
> >> "escamoteur" <mail@burkharts.net> wrote in message
> >> news:34DFB3C1-A498-41C9-8BCC-81D6445372D6@microsoft.com...
> >>> Hi,
> >>
>>>> I found some strange behaviour in Outlook 2007. I tried to itterate
> >>> through all items of a folder usinf the items property. On the first
> >>> time some of the items were missing. Calling the function a second time
> >>> all items were returned.
> >>> After that I tried it using a table and now everything worked fine. Btw.
> >>> there are only about 30 items in the folder.
> >>
>>>> Best
> >>> Tom
> >
>>>

> >


>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
E Items collection doesn't contain all items Outlook VBA and Custom Forms 5
E Items collection doesn't contain all items Outlook VBA and Custom Forms 1
R Adding Userform Dropdown List items from names of subfolders on network drive Outlook VBA and Custom Forms 10
C How to search for items in Outbox with multiple accounts? Using Outlook 14
N How to add or delete items to Move dropdown Menu Using Outlook 0
sophievldn Looking for a macro that moves completed items from subfolders to other subfolder Outlook VBA and Custom Forms 7
wayneame Changing the Form Used by Existing Task Items in a Folder Outlook VBA and Custom Forms 3
K How to share multiple calendar items Using Outlook 1
F Wishlist Outlook suddenly began synchronizing deleted items every time I delete a single email. Using Outlook 2
D Autosort macro for items in a view Outlook VBA and Custom Forms 2
J Names in sent items suddenly show as Bob Smith (bobsmith@sample.com) Using Outlook 3
M Messages Intermittently Dont Arrive In Sent Items After Sending Successfully Using Outlook 4
D Outlook 2016 Outlook not saving Sent Items Using Outlook 4
G Retention Policy for Outlook.com Deleted Items folder Using Outlook 0
M Outlook on 3 Computers Shows Different Total Items on Same Account Using Outlook 3
B oContacts.Items.Restrict Misses Some Contacts Outlook VBA and Custom Forms 3
T Changing Sent Items location in Outlook 2019 Using Outlook 0
K Use VBA to find Sender and Recipient from Microsfot 365 Journaled Email Items Outlook VBA and Custom Forms 3
A Connect to server to views items Using Outlook 0
D Mail in Sent Items Gone Using Outlook 12
R How to get the Items object of the default mailbox of a specific account in a multiple account Outlook? Outlook VBA and Custom Forms 0
A Cannot copy this folder because it may contain private items Using Outlook 0
GregS Outlook 2016 Sent Mail absent from Sent Mail or Sent Items Folders Using Outlook 4
C How to use VBA to show only items x days old or more Outlook VBA and Custom Forms 1
T Increasing the number of items that appear on the Categories list Using Outlook 2
T How can you include Junk Email in Search Results like you can include Deleted Items? Using Outlook 3
King Mustard Sort search groups by amount of items? Using Outlook 1
J Sent Items Folder NOT Showing Correct From Email Address Using Outlook 0
C Pull Outlook shared calendars items from Excel Outlook VBA and Custom Forms 4
J Outlook Reply > From > Other Email Address... > Address Not Showing in Sent Items... From Email Outlook VBA and Custom Forms 0
GregS Outlook 2016 Sent Items vs Sent Messages Using Outlook 2
M Sent mail not showing in Sent Items folder; but they can be found with Search Using Outlook 3
A Order of Recent Items in Attach File List Using Outlook 5
W Outlook 2010 some sent items marked unread now (was Ok before) Using Outlook 0
D Unopened message in inbox deleted and not in deleted items Using Outlook 3
T "cannot find the calendar folder for this item" - calendar items stuck in outbox Using Outlook 0
R Exporting recovered Deleted Items outside the Inbox Using Outlook 1
Commodore Folders always closed in move/copy items dialog box Using Outlook 3
O Outlook 365 - Toolbar - Close all items - missing? Using Outlook 3
B Clear Offline Items (Mail Folder) via VBA Outlook VBA and Custom Forms 1
A Move email items based on a list of email addresses Outlook VBA and Custom Forms 40
R Retention periods and Deleted Items Using Outlook 7
V Items missing in Sent folder Using Outlook 10
P Deleted Items - Unable to Iterate All of Items Outlook VBA and Custom Forms 1
P How do I convert outlook “to-do” items to “tasks” Outlook VBA and Custom Forms 1
N Tracking Mail items being moved to folders Outlook VBA and Custom Forms 5
icacream Can't the Deleted Items Folder be self cleaning ? Using Outlook 2
N Selecting multiple calendar items Using Outlook 4
S Display PF contact folder items to select contact to link to appointment Outlook VBA and Custom Forms 1
M Sent Items Folder is Present but Not Displayed Using Outlook 2

Similar threads

Top