?
Solved

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

Posted on 2010-08-16
8
Medium Priority
?
1,561 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 600 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
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
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 800 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

Technology Partners: 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.
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

801 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