?
Solved

New Email

Posted on 2000-03-26
1
Medium Priority
?
155 Views
Last Modified: 2010-05-02
I need to know how can I count the unreaded email in my outlook inbox??
0
Comment
Question by:hello_200
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 30 total points
ID: 2657951
The proposed solution uses MSOutlook, but could also be solved using MAPI objects (CDO).
The items counted are looked up directly in the inbox, so if you have an inbox assistant moving itmes to other folders, they won't be counted.

You need to have Microsoft Outlook in your references:

  Dim a As Outlook.Application
  Dim f As Outlook.MAPIFolder
   
  Set a = New Outlook.Application
  Set f = a.Session.GetDefaultFolder(olFolderInbox)
  msbgox f.UnReadItemCount
 
  Set f = Nothing
  Set a = Nothing
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question