Outlook Add-in Interaction with Desktop Search

P

Paul Lennon

Hi,

I have an Outlook add-in that works fine as the user moves about the
Outlook UI. They forward a message, I get the forward event. Same goes
for open and reply. Now our users want to use Windows Desktop Search
(WDS) and Google Desktop Search (GDS). Both of these applications
present a list of messages to the user from which they can open,
forward, reply and the like. Each of these actions transfers the user to
Outlook where the message appears ready for them to access.

My add-in receives the "open in Outlook" open event and behaves
correctly. I am not able to receive the reply, reply all and forward
events. I receive the open event because I monitor the Inspector
activate event and then hook all of the messages within the inspector
view. This works with the desktop search apps since their open passes
through the Inspector. Messages that are replied to or forwarded are
used as the template for a new message. I suspect that they are read and
that I should receive a read event. The inspector is activated only
after the forwarded message is created and made available for edit.

I receive message events because I registered my addin with each message
in the Inspector. Since the search app can find any message in the
entire mailbox does this mean that I need to register with every message
just so that I can learn when a message is being read? I know of
customers with 10s of thousands of messages per mailbox (one claims
100K), this seems like a brute force method. Is there a lighter way?
Does Outlook post an event that says "I am reading this message"?

Thanks for your help,

Paul
 
K

Ken Slovak - [MVP - Outlook]

Obviously you can handle NewInspector and that will tell you something was
opened, you just have no way of knowing if it was opened as a forward or
reply or whatever without hacking at the subject and seeing if it has RE or
FWD in it and that's only good for English (a German reply would have AW).

Unless those search objects expose a programmable API there's no way to know
what they are showing. Handling a possible action on every item in every
folder of every open store is not practical. Even if you could set it up the
processing overhead would bring Outlook to its knees.

I'd probably try to do the best I could with NewInspector by checking for
EntryID = "" to see if it's a new item, checking for Body and HTMLBody being
blank and testing the subject for clues as to replies and forwards.

In a threaded conversation you can also use ConversationTopic to find other
emails in the same thread and guess about reply/forward.

The item.Read event only fires for an item where you are handling events, so
that's not practical.
 
P

Paul Lennon

Hi Ken,

I agree, registering each item for events would be terrible. Presently I
see the NewInspector event and then the Open on the new message. You are
suggesting that I modify the new message during the Open event. That
makes sense. I was going through the message properties on a forwarded
message and I didn't see any references to the source message. Do you
know if Outlook tracks the original message id? Trying to match the new
message to one of many thousand others is going to be a bear too.

The desktop search apps are most likely calling in through a MAPI or CDO
API. I wonder if I can hook into that and intercept the forward/reply
request there?

Thanks for your help.

Paul
 
K

Ken Slovak - [MVP - Outlook]

I'm not suggesting that you modify anything on the message. I suggested a
series of checks of:

EntryID: null string for new emails just being opened and never saved. Could
be new, reply, forward.

Subject: will have RE or FWD at beginning if the message is a forward or
reply.

ConversationTopic: Any earlier message in a thread will have the same
ConversationTopic, which can be searched for.

ConversationIndex gets longer by as I recall 20 bytes per message in a
thread. So message 1 will have a ConversationIndex length of X, message 2
(reply or forward) would have X + 20, etc.

Anything will be a hack, you just have to pick the hacks you want to use.
 

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