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

Explanation of Items count?



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 4th 07, 12:38 AM posted to microsoft.public.outlook.program_vba
salad
external usenet poster
 
Posts: 27
Default Explanation of Items count?

I have the following code.
Dim Olapp As Object
Dim Olmapi As Object
Dim Olfolder As Object

Set Olapp = GetObject(, "Outlook.Application") 'get reference
Set Olmapi = Olapp.GetNamespace("MAPI")
Set Olfolder = Olmapi.GetDefaultFolder(6) '6 for olfolderinbox

MsgBox Olfolder.name & " " & Olfolder.Items.Count

The folder name is Inbox and the count is 80. I can't figure out where
it gets the number 80. I expected the count of 30 which is what I have
in my Inbox.

In the pane Mail/Favorite Folders I have
Inbox 30
Unread 30
Sent 8
Deleted 6

In the pain PersonalFolders I have
Drafts 18
Inbox 30
Junk 51
DeletedItems 6
Sent 8

Under ArchiveFolders I have
DeletedItems 29
SentItems 5

DeletedItems (29) = Junk (51) equals 80 but that doesn't make sense.

Do you have any idea what is being tallied?
 




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
Don't want the unread mail count for Junk Mail or Deleted items. George Hogge Outlook - Installation 3 April 1st 07 11:38 PM
Outlook crashes - no explanation - pop3 boe Outlook - General Queries 2 November 7th 06 03:40 PM
error retrieving folder.items.count kappe79 Outlook and VBA 3 September 19th 06 01:29 PM
Count dates [email protected] Outlook and VBA 7 August 10th 06 04:13 PM
count items in an Outlook View norm Outlook - Using Contacts 3 February 6th 06 04:02 AM


All times are GMT +1. The time now is 10:56 AM.


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.