Solved

Extract specific email from Outlook

Posted on 2001-06-08
3
180 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 25 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

749 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