Outlook 2013 / Items count in a folder.

HI ,

I am using VBA code to calculate the number of items(olFolder.Items.Count) in a folder . I have folder structure with folder from 2005 to 2015. The output displayed is 0 for all the folders except 2014 and 2015  even though i have more than 4000 mails in each folder . Also for 2014 folder , even though it has more than 4000 mails , the output is 2700. I am using Outlook 2013. Does anyone know any solution?

Thanks & Regards

Himanshu Sharma

May 7th, 2015 9:26am

Can you share the code? It would help a lot.
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2015 9:36am

Hi ,

What would be the output for the below mentioned command ? Does it shows the exact count.In case it is showing the exact count then you need to check the code .

Get-MailboxFolderStatistics -Identity "nithya" | ft name,*item* -au

May 7th, 2015 9:38am

Below is the code:

Sub GetAttachments()
 Dim ns As NameSpace
 Dim inBox As MAPIFolder
  Set ns = GetNamespace("MAPI")
  Set inBox = ns.PickFolder -- Picking the 
 MsgBox inBox.Items.Count
 End Sub

   
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2015 9:51am

Hi,

In exchange 2013, we use Get-MailboxFolderStatistics cmdlet to retrieve information about the folders in a specified mailbox, so please use this cmdlet first to check if the account id right.

And this is Exchange forum, to solve the problem about VBA code, I suggest to post your problem on VBA forum.

Best Regards

May 8th, 2015 4:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics