outlook 2010 mail item count doesnt match display

Status
Not open for further replies.

Terri Jones

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Re: work email account outlook 2010/exchange server. Using excel macro I capture all outlook messages into a spreadsheet. I receive upwards of a thousand emails daily. Using a for next loop I move through the mail item count and record them in excel. The mail item count is half of the displayed total. If I have 250 messages the mail item count will return 125 causing me to run the process multiple times to clear inbox. the next round picks up 62, then 31, then 16,8,4,2,1 etc.. (This is not a priority with our IT dept. I am on my own and trying to workaround issue).

I want to retest item count within the current macro to keep working to get to an empty inbox. Current mail item counts are not correct, do not match the displayed totals. I am thinking about having macro make multiple attempts to loop through a testing sequence that set outlook/run macro that records messages/clear instance/reset outlook instances until the inbox mail item count returns 0 before exiting macro process. Does this seem plausible? Any suggestions? Is there another collection where I could obtain a more reliable count?
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Do you remove the items in your loop? If so, loop backwards. While Count correctly returns the remaining items, it's the index that points to non-existing items.
 

Terri Jones

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Hi Michael,
Sorry for the delay. Thought I had asked for email notifications.


Yes I am removing the items as I loop through them.
Here's where I am capturing count

For iRow = 1 To Folder.Items.Count
'not exactly sure what reversing the loop looks
To reverse would that be
For iRow = -1 to Folder.Items.Count
or
For iRow = Folder.Items.Count to -1

Thanks
T
 

Terri Jones

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Thanks Michael for putting me on the right track. This code works
imailcount = Folder.Items.Count
For iRow = imailcount To 1 Step -1
Set Msg = Folder.Items(iRow)

thanks again
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M Duplicate Primary Mail Accounts outlook 2010 Using Outlook 0
N Creating or changing the main new mail message template in Outlook 2010 Using Outlook 2
S Translate mail directly in Outlook 2010 Using Outlook 0
T Outlook 2010 - Contacts associated with an e-mail address Using Outlook 1
H Outlook 2010 unable to send iCloud account e-mail after iOS 7 upgrade Using Outlook 12
F Outlook 2010 contact e-mail Display as: does not show contact name Using Outlook 2
B How to have Outlook 2010 Calendar when your mail server is Imap? Using Outlook 10
T sent mails in outlook 2010 not coming in the yahoo mail Using Outlook 1
W Microsoft Mail & 2010 Outlook Using Outlook 1
T Make Default Outlook 2010 Client Mail Using Outlook 1
L Outlook 2010- Be able to move default Mail folders (Outbox, Draft, etc) Outlook Wishlist 1
H Importing Windows Live Mail Contact into Outlook 2010 Using Outlook 0
F CAN'T SAVE OUTLOOK 2010 E-MAIL TEMPLATE (.oft) Using Outlook 1
N Sending encrypted signed mail using outlook 2010 Using Outlook 1
C migrating from Windows Live Mail over to Outlook 2010 Problems ... Using Outlook 2
R Outlook 2010 Sent emails don't appear in the sent mail folder Using Outlook 9
M Mail in HTML format can't be sent if url or number is in the body Outlook 2010 Using Outlook 2
S Outlook 2010 is not deleting mail from my server once downloaded Using Outlook 2
C Text reply mail in Outlook 2010 has automatic margin indent Using Outlook 9
O Outlook 2010 replying to an e-mail Using Outlook 5
C Help – Outlook 2010 is not receiving G-mail (IMAP) E-mail. Using Outlook 1
W Outlook 2010: Need to keep restarting outlook to download mail from a MAPI server Using Outlook 4
B Outlook 2010 wont send mail today Using Outlook 9
D Publisher 2010 (x64) not connecting with Outlook 2010 (x64) via Mail Merge Using Outlook 1
S Set up Outlook 2010 by backing up pst files, incoming mail fine but outgoing originally gave me the Using Outlook 1
J Outlook 2010 account for sending mail only Using Outlook 2
M Activesynch Outlook 2010 mail with IPAD Using Outlook 1
T How can I send e-mail from an Access 2010 application using Outlook not CDO Using Outlook 1
N Outlook 2010 crashed-mail folders out of order when it came back up Using Outlook 1
G Some emails addressed to me are not received through Outlook 2010, but must be picked up in my Comcast mail box. Using Outlook 2
T Can't receive or send e-mail in Outlook after downloading latest Windows updates on Tuesday, 14 Dec 2010, at 6:00 pm. Using Outlook 3
R outlook 2010 half of Emails going to unread mail folder Using Outlook 1
F Office 2010 Mail merge into Work 2010 using a specific Outlook catagory filter. Using Outlook 2
S Hyperlinks do not open to IE9 that are embedded in Outlook 2010 e-mail messages. Using Outlook 1
R Outlook 2010 Quick Steps - Mark as Read Action and New Mail Notification Using Outlook 1
K I have 26 mail in my webmail which is not coming in Outlook 2010 when I open the program.__some mail from my webmail has been loaded into Outlook when Using Outlook 2
C Where's my Outlook 2010 mail? Using Outlook 7
C Outlook 2010 sending out blank emails in reply to incoming mail- of it's own accord. Using Outlook 1
C Help! Running Outlook 2010....merged mail from old laptop to new and now I have three separate sections. Using Outlook 1
J Windows Live Mail Not Syncing With GoDaddy IMAP Email Account, Will Outlook 2010 Be Any Better? Using Outlook 0
C Outlook 2000 to Outlook 2010, mail doesn't go to my outlook.pst file Using Outlook 2
U Outlook 2010 - Mail: setting to show email address with sender name? Calendar: decline attendance w/ Using Outlook 2
K New Outlook 2010, Windows 7 syncing with Yahoo.pop.mail. Using Outlook 2
K No "Send" button in Outlook 2010 Mail Using Outlook 3
K Outlook 2010 won't work with FSNET/Orange service? Turn to MS Mail Using Outlook 4
B Export from Outlook Express and Windows Live Mail fails to copy to Outlook 2010 Using Outlook 1
A I have outlook 2010. I have received mail but can not locate mail that was down loaded. Using Outlook 2
D Outlook 2010 unable to use mail when in home wireless network. Using Outlook 3
A transferring outlook 2007 e-mail folders to outlook 2010 Using Outlook 1
M Outlook 2010 Windows XP Mail index error Using Outlook 2

Similar threads

Top