A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Items collection doesn't contain all items



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 9th 09, 02:33 PM posted to microsoft.public.developer.outlook.addins,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba,microsoft.public.platformsdk.mapi
escamoteur
external usenet poster
 
Posts: 147
Default Items collection doesn't contain all items

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

  #2  
Old September 9th 09, 05:29 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Items collection doesn't contain all items



Do you have set a filter? Or are you maybe deleting items from the
collection in a loop?

--
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 Wed, 9 Sep 2009 15:33:48 +0200 schrieb 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

  #3  
Old September 9th 09, 06:40 PM posted to microsoft.public.developer.outlook.addins,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba,microsoft.public.platformsdk.mapi
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Items collection doesn't contain all items

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)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"escamoteur" wrote in message
...
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



  #4  
Old September 9th 09, 07:20 PM posted to microsoft.public.developer.outlook.addins,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba,microsoft.public.platformsdk.mapi
escamoteur
external usenet poster
 
Posts: 147
Default Items collection doesn't contain all items

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" schrieb im Newsbeitrag ...
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)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"escamoteur" wrote in message ...
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




  #5  
Old September 9th 09, 10:05 PM posted to microsoft.public.developer.outlook.addins,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba,microsoft.public.platformsdk.mapi
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Items collection doesn't contain all items

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

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"escamoteur" wrote in message
...
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" schrieb im Newsbeitrag
...
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)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"escamoteur" wrote in message
...
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






  #6  
Old September 9th 09, 10:31 PM posted to microsoft.public.developer.outlook.addins,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba,microsoft.public.platformsdk.mapi
escamoteur
external usenet poster
 
Posts: 147
Default Items collection doesn't contain all items

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

"Dmitry Streblechenko" schrieb im Newsbeitrag ...
Hard to say without seeing the relevant snippet of your code.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"escamoteur" wrote in message
...
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" schrieb im Newsbeitrag
...
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)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"escamoteur" wrote in message
...
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





 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Items collection doesn't contain all items escamoteur Outlook and VBA 1 September 9th 09 02:46 PM
how to retain 10 days items in Outlook 2003 deleted items folder? Balthazar Outlook - Installation 2 June 7th 06 04:05 PM
Auto Empty Deleted Items on Exit OR after X days or X Items accumulated? JDJ Outlook - General Queries 2 May 30th 06 10:48 PM
Reading mails from Sent items, Deleted items, Draft folder of outlook from VB6.0 Viswanathan Outlook - General Queries 8 May 26th 06 04:31 PM
Inbox, Sent Items & Outbox in Deleted Items in Outlook 2003 & OWA with Exchange splounx Outlook - General Queries 1 February 17th 06 02:22 AM


All times are GMT +1. The time now is 12:28 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-2025 Outlook Banter.
The comments are property of their posters.