Should I switch to redemption

E

escamoteur

Hi,

I'm programming my Addin for Outlook2007. After running against several restrictions I know think about switching to Redemption and
RDO, but it seems that it's a oneway road. If I doo I have completely to switch as it seems like RDO Objects cannot be casted to
Outlook Object Model objects.

What are your experiences??
Best
Tom
 
N

Nabil

Hi,

No, it's not a 1 way road.

You are correct, most RDO objects cannot be casted to Outlook objects,
however, most objects such as Folders, messages... etc have EntryIDs which
you can use to get the Outlook Object

For example

Private gFolder_CurrentOutlookFolder As Outlook.Folder = Nothing
Private gFolder_CurrentOutlookRDOFolder As Redemption.RDOFolder = Nothing

gFolder_CurrentOutlookFolder = explorer_ActiveExplorer.CurrentFolder
gFolder_CurrentOutlookRDOFolder =
myRDOsession.GetFolderFromID(gFolder_CurrentOutlookFolder.EntryID)

As you can see above, I'm using the EntryID of an Outlook Folder to get an
RDO folder.

NOTE: Outlook events are so unreliable it is unbelievable

Good luck
 
E

escamoteur

Yes, I realized the way over the ItemID, but that's a bit arkward.
So you say Remdemtion Events are more reliable?

You can recommend the use of redemption?

How do I get an Redemption Item from the item that I get from a FormRegion Object?

Best
Tom
 
N

Nabil

See below
Yes, I realized the way over the ItemID, but that's a bit arkward.

I think it's just as awkward as casting to be honest
So you say Remdemtion Events are more reliable?

A lot more reliable, not 100% reliable still
You can recommend the use of redemption?

If your addin is event driven then yet, definately.
How do I get an Redemption Item from the item that I get from a FormRegion Object?

Sorry, I have very little experience with outlook FormRegions.
 
E

escamoteur

Thanks a lot.

The FormRegion is not important. I can get an Item Object from the region or from the inspector object. Normally I would cast this
Object to e.g. Outlook.TaskItem. How can I cast this to the appropriate RDO Object?

Also the difference between a cast and the ItemID is, A cast does not call a function that has to lookup an item. So performance is
also a point

Best
TOm
 
N

Nabil

See below
The FormRegion is not important. I can get an Item Object from the region or from the inspector object. Normally I would cast this
Object to e.g. Outlook.TaskItem. How can I cast this to the appropriate RDO Object?

Having had a quick look, I don't know how you'd cast a TaskItem. I know
that for mail items you do this

Dim myRDOMail As Redemption.RDOMail
Dim myMailItem As Outlook.MailItem

myRDOMail = myRDOsession.GetMessageFromID(myMailItem.EntryID)

Have a look at the following link which may help you and also have a alook
throught the FAQ section on the redemption website

http://www.dimastr.com/redemption/rdo/RDOTaskItem.htm
 
K

Ken Slovak - [MVP - Outlook]

You wouldn't cast it, you'd get the Outlook.TaskItem and get its EntryID and
get an RDO item from that.
 
K

Ken Slovak - [MVP - Outlook]

I've used a mix of Outlook object model and RDO objects in almost every
program I've written probably for the last 8 or 9 years. Even with Outlook
2007's extended object model there are many things you can do with RDO that
you can't with the OOM. And if you have to support older versions the new
object model stuff isn't there.

I highly recommend RDO, but your mileage may vary.
 
S

SvenC

Hi Tom
I'm programming my Addin for Outlook2007. After running against several restrictions I know think about switching to Redemption
and RDO, but it seems that it's a oneway road. If I doo I have completely to switch as it seems like RDO Objects cannot be casted
to Outlook Object Model objects.

What are your experiences??

I use RDO in some modules. It works great. And the big advantage over CDO 1.21
or OOM is: if you have a problem, Dmitry is really good at understanding your
problem and providing a solution. At least, that is how I memorize it from the past,
because I do not have any issues any more ;-)

While you are correct about the casting, Nabil provided some solutions.

Another option is to use the MAPIOBJECT property provided by most OOM or
CDO objects. Search for MAPIOBJECT on http://www.dimastr.com/redemption
to find samples how to use that.
 
E

escamoteur

Thanks Ken! As always you have a sound answer.

How do you decide what to do with RDO and what with OOM? Or do you do almost all in RDO?

Best
Tom
 
K

Ken Slovak - [MVP - Outlook]

It depends on what versions of Outlook I'm supporting for that code mostly.

When I'm supporting Outlook 2000 and up I use a lot more RDO stuff because
of the more limited Outlook object model than I would if I was only
supporting Outlook 2007.

In the real world I've yet to see a project that was only for Outlook 2007
(except for my book stuff). Mostly lately I've been asked to support Outlook
2003 and up, although I'm still supporting 2000 for some new projects. So
that partly determines what I'd use.

Some things you can't do even with PropertyAccessor, such as reading large
property streams or things restricted by MS for "Outlook business logic"
reasons. Those are candidates for RDO, as are things still not exposed by
the object model. Some of the really hairy undocumented stuff I do is almost
pure RDO and Win32 API/PInvoke code, so it all depends and will vary from
project to project and even from class to class.
 
D

Dmitry Streblechenko

You can either use RDOSession.GetMessageFromID to retrieving RDOMial given
an entry id.
Or you can use the Safe*Item family of objects - simply ste the
SafeMainItem.Item property to an instance of the Outlook's MailItem object.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top