Solved

New Email

Posted on 2000-03-26
1
149 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 142

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now