Solved

Open message from inbox in Outlook 2000 Inbox using VBA / CDO / Redemption / Message ID

Posted on 2010-08-16
8
1,544 Views
Last Modified: 2012-05-10
Hello -

I'm using  Outlook 2000 / VBA / CDO / Redemption / Exchange 2003.

In Access, I cycle through the inbox and build a table of Message Subject / Message ID / Sender.

I want to be able to open the original mail item in the Outlook message interface by passing the Message ID.

Can this be done?
0
Comment
Question by:mattinvt
[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
  • 3
  • 2
8 Comments
 
LVL 3

Assisted Solution

by:dockhand
dockhand earned 150 total points
ID: 33448504
If you also store the EntryId (a MailItem property)  you could then later select the item with that id.  You might think of the MailItem.EntryId as a "GUID" for each mail item.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 33449192
Hi, mattinvt.

Yes, it's possible using the GetItemFromID method of Outlook's Session object.
0
 

Author Comment

by:mattinvt
ID: 33456858
Ok, that's good.

- How to cycle through each item to get Redemption.PR_ENTRYID
- I've tried all sorts of methods to open the message on the Entry ID without luck.

0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 3

Expert Comment

by:dockhand
ID: 33457198
This should help you select your items
sSearchString = "[EntryID] = '" & sEntryID & '"'
Dim moNameSpace As Object

myFolder = myNameSpace.GetDefaultFolder(mlFolderSentMail)  '<---- choose your default folder constant here
Set olEmail = myFolder.Items.Find(sSearchString)

Open in new window

0
 

Author Comment

by:mattinvt
ID: 33459070
This code is where I'm at
Set Session = CreateObject("Redemption.RDOSession")
Session.Logon
Dim GUID As String
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set Session = CreateObject("Redemption.RDOSession")
GUID = (140 Character ENTRYID string copied from a email msg via Outlook Spy)
Set olitem = myNameSpace.GetItemFromID(GUID)
olitem.Display

This works as it should..

However
1 - I can't seem to read the 140 character ENTRYID from Redemption.PR_ENTRYID
It returns a 9 charater string instead.

2 -Furthermore,  How do I loop through my inbox (default) to read each msg's ENTRYID (140 charater ID)

0
 
LVL 76

Accepted Solution

by:
David Lee earned 200 total points
ID: 33459237
1.  I'm not on a computer with Redemption right now.  If I remember correctly the syntax would be something like

    GUID = RedemptionObject.Item.EntryID

2.  To loop through the items in your inbox folder

    Set olkInbox = Session.GetDefaultFolder(olFolderInbox).Items
    For Each olkMsg in olkInbox
        GUID = olkMsg.EntryID
    Next
0
 

Author Comment

by:mattinvt
ID: 33544021
Any ideas why all instances of
Set olitem = myNameSpace.GetItemFromID(GUID)
would bail with an "The Operation  Failed error Message"

I'm ditching Outlook 2003 for Outlook 2000 which is more of the standard here.

So I switched from Outlook 11 object library to Outlook 9 object library.

That's the only thing that changed.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 33547470
It's been a long time since I did anything in Outlook 2000.  I'd start by checking to make sure that GUId contains a valid EntryID
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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

707 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