[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2010-08-16
8
Medium Priority
?
1,575 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
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
New style of hardware planning for Microsoft Exchange server.
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
Suggested Courses

649 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