Count Emails In Outlook

nancy25dec

New Member
Joined
Sep 15, 2007
Messages
34
If there is mailbox in outlook called "MIS". What VB should I use to count emails in Mailbox.

Your help will be greatly appreciated.

Nancy
 
Hi Tom,

I was seaching for this code, I got in this thread, But I am not getting the result,
I have also renamed the folder as per the code, but still I am getting an msg box saying, No such folder exists.
If you are not getting the expected result at that more basic level of one subfolder deep, you will not get your expected result at the more complex level of those other folders. So, I would recommend you take a close look at how you edited the code I posted, which worked for me and nancy25dec, and carefully note what the exact (exact means exact) names of your Outlook folders really are. Also, if you are not getting an error, maybe there were no unread emails in your folders and hence nothing for the code to act on. The good news is, it's probably a simple adjustment you need to make to the code you are working with, seeing as it has been successfully tested with other users' Outlook set-ups.
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I'm trying the same code - but always getting a message - No folder
I have about 6 different PSTs and want to search for mail from only one of them
Would it be a problem if I'm using an exchange server as against MAPI?
I'm a novice here... so pls help
 
Upvote 0
Hi, I would like to ask if its possible to edit this macro in such a way that it searches all the subfolders that are within a specific mailbox and if its possible to define what time the email was received.

For example, my mailbox is known as mailbox - A and it contains a subfolder B with another subfolder C in B.

Any help is greatly appreciated many thanks
 
Upvote 0
So I have to say I love the code -

However, I am wondering if there is an adjustment to be made that it can take the total count and place it in Column B1 for example.

Everything else works fine, but I need to tally it. As it stands, I have A1 formated with =today() but I need B1 to "show" how many emails have been recieved.

Cheers,

Rattdad
 
Upvote 0
Hi Tom,

Your code works great for the purpose. I am trying to modify it however to count emails based on category rather than date in Office 2010. Is this possible? Thank you.
 
Upvote 0
Thank you for trying to search out an answer first, as you did here with your comment and question on a 4-year old item.

I hope I can answer your question but can you please help me understand with examples or more detail regarding what you mean by "based on category". What is a "category" where your Outlook app is concerned.

Looks like this thread has seen quite some additional action with these prior questions from various members that I never noticed:

• March 2011 from Rattdad.

• February 2010 from ZR4484.

• March 2009 from wilde.abu.

If any of you still have not gotten an answer yay these past couple years please post back...this thread must have fallen into an Excel Bermuda Triangle...or maybe I did.
 
Upvote 0
This is great stuff Tom. I am wondering if it is possible to adapt the test for emails in the last day to emails in the last 30 minutes? If you have any pointers I would really appriaciate it. Thanks.


For iCount = 1 To EmailCount With objFolder.Items(iCount) If DateSerial(Year(.ReceivedTime), Month(.ReceivedTime), Day(.ReceivedTime)) = myDate Then DateCount = DateCount + 1 End With Next iCount
 
Upvote 0
Hi Tom,

Thank you for your response. A category is a tag. When looking at a folder in Outlook the headings appear as such. I can't figure out how to attach an image. Thank you.

From|Subject|Received|Size|Categories
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,103
Members
452,302
Latest member
TaMere

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top