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
Solved

New Email

Posted on 2000-03-26
1
152 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
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 15 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

860 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