Outlook 2007 Add-In replying with custom message class

D

DaveUK

Hi,
I'm developing a VSTO add-in for Outlook 2007 that is replacing an old
custom form in 2003.

I have two form region which replaces the default message read and compose
pages on a custom message class defined in the registry.

The add-in works fine, but I want all replies to a message with my custom
message class ("IPM.Note.MyClass") to be of type "IPM.Note.MyClass" as well.

I found that this can be defined as a custom action in the form region
manifest, however this does not seem to work when replying outside of the
read mail inspector:

1. With a new instance of Outlook, if I reply to a "IPM.Note.MyClass"
mailItem, using the standard explorer toolbar buttons, it replies using a
standard IPM.Note.

2. Now if i open the mailItem and click the inspector's reply button, it
works as expected, opening an "IPM.Note.MyClass".

What is strange is that after performing step 2, if I repeat step 1 (using
the explorer) on the same mailItem, it will open an "IPM.Note.MyClass" as I
wanted originally!

Can anyone reproduce this or shed any light on my problem?
 
K

Ken Slovak - [MVP - Outlook]

I haven't tried what you're trying so I can't respond with any authority at
all on this. Since you're using a COM addin to handle the Form Region why
not just check for the MessageClass of an item with the same
ConversationTopic and seeing if it's your custom MessageClass and if so
setting the reply item to the custom MessageClass? Would that work for you?

If that doesn't do it then I'd suggest posting a question about the problem
on Ryan Gregg's blog, he was in charge of Form Regions for Outlook 2007 and
is usually pretty good about answering questions about Form Region problems.
You might have hit on a bug. Ryan's blog is at
http://blogs.msdn.com/rgregg/default.aspx
 
S

Sue Mosher [MVP-Outlook]

Just curious: Are you also implementing the form region in the reading pane? The reason I ask is that if the user selects the item in the and you're not loading the region only for read and compose modes, then the region is not loaded and therefore any custom actions wouldn't be applied.
 
D

DaveUK

Thanks for your reply, Sue,

I did think about whether the custom actions are being loaded or not, as it
seems that everything functions correctly after the form region is displayed
in an inspector.

But I am displaying the form in the reading pane, so it should be loaded. :(

However I should make a change to my original post - I have found that in my
'step 2' I do not have to actually reply to the mailitem in order for 'step
1' to work afterwards. Just opening the inspector is enough.
 
D

DaveUK

Thanks for your reply, Ken,

I will try your suggestion when I get a chance - I suppose your solution
stems from the fact that the ConversationTopic is the same on a received
email, as on the reply email, giving a way of linking the reply mailitem with
the original one.

However this may have problems if there is more than one mailitem in the
folder, with the same conversation topic, but with different message classes.
(My IPM.Note.CustomClass can be used to reply to IPM.Note emails (using a
custom button) as well as 'automatically' to reply to IPM.Note.CustomClass
emails)

Also it is a bit more overhead than should really be necessary.

I will also try Ryan Gregg as you suggest.

Thanks very much!
Dave
 

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