mattinvt
asked on
Open message from inbox in Outlook 2000 Inbox using VBA / CDO / Redemption / Message ID
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?
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?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
- 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.
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)
ASKER
This code is where I'm at
Set Session = CreateObject("Redemption.R DOSession" )
Session.Logon
Dim GUID As String
Set myOlApp = CreateObject("Outlook.Appl ication")
Set myNameSpace = myOlApp.GetNamespace("MAPI ")
Set Session = CreateObject("Redemption.R DOSession" )
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)
Set Session = CreateObject("Redemption.R
Session.Logon
Dim GUID As String
Set myOlApp = CreateObject("Outlook.Appl
Set myNameSpace = myOlApp.GetNamespace("MAPI
Set Session = CreateObject("Redemption.R
GUID = (140 Character ENTRYID string copied from a email msg via Outlook Spy)
Set olitem = myNameSpace.GetItemFromID(
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)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
Set olitem = myNameSpace.GetItemFromID(
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.
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
Yes, it's possible using the GetItemFromID method of Outlook's Session object.