?
Solved

New Email

Posted on 2000-03-26
1
Medium Priority
?
156 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

650 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