?
Solved

Extract specific email from Outlook

Posted on 2001-06-08
3
Medium Priority
?
188 Views
Last Modified: 2010-05-02
Hello,

1. I would like to find out which email item is currently
highlighted by the user and get the EntryID of the highlighted mail item. Any body has any idea?

2. If i do not want to put the code for (1) in a macro,
can i compile an exe or something like that, and put it
as a button on Outlook? Actually my intention is to
hide the code from the user (since i can't do that with macro)

Any answer appreciated.
Thanks
0
Comment
Question by:xlong
[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
3 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 75 total points
ID: 6169248
I don't believe there is a way to know which item is selected. However you can get the EntryID for each item in the Inbox as follows:

Dim objApp As Outlook.Application
Dim objInbox As Outlook.MAPIFolder
Dim objItem As Object 'Not all are MailItems

Set objApp = New Outlook.Application
Set objInbox = objApp.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
For Each objItem In objInbox.Items
   Debug.Print objItem.EntryID
Next
Set objApp = Nothing

Hope this helps,
Anthony
0
 

Expert Comment

by:amp072397
ID: 6789790
xlong:

Just a friendly reminder to return to this open question.

thanks!
amp
community support moderator
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7133456
Hi xlong,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept acperkins@devx's comment(s) as an answer.

xlong, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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

762 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