Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Extract specific email from Outlook

Posted on 2001-06-08
3
Medium Priority
?
191 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 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