Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reply/forward icons for form region not working - Outlook 2007

124 views
Skip to first unread message

d.j.hi...@hotmail.co.uk

unread,
Jul 11, 2007, 5:07:37 AM7/11/07
to
Hi,

I'm trying to get my custom icons to work for my custom message class
with a form region loaded from a VSTO add-in in Outlook 2007.

The read, unread and window icons are all working correctly, however
the icon in the explorer doesn't change when I reply or forward the
mail.

here is the icon element from my form region manifest xml:

<icons>
<default>addin</default>
<page>addin</page>
<unread>addin</unread>
<read>addin</read>
<forwarded>addin</forwarded>
<replied>addin</replied>
<window>addin</window>
</icons>


And here is part of my GetFormRegionIcon on the add-in class
implementing FormRegionStartup:

switch (Icon) {

case
Outlook.OlFormRegionIcon.olFormRegionIconForwarded:
return
PictureDispConverter.ToIPictureDisp(Properties.Resources.External_Forwarded_Icon);

case
Outlook.OlFormRegionIcon.olFormRegionIconReplied:
return
PictureDispConverter.ToIPictureDisp(Properties.Resources.External_Replied_Icon);

case
Outlook.OlFormRegionIcon.olFormRegionIconRead:
return
PictureDispConverter.ToIPictureDisp(Properties.Resources.External_Read_Icon);

case
Outlook.OlFormRegionIcon.olFormRegionIconUnread:
return
PictureDispConverter.ToIPictureDisp(Properties.Resources.External_Unread_Icon);

case
Outlook.OlFormRegionIcon.olFormRegionIconWindow:
return
PictureDispConverter.ToIPictureDisp(Properties.Resources.External_Page_Icon);

case
Outlook.OlFormRegionIcon.olFormRegionIconPage:
return
PictureDispConverter.ToIPictureDisp(Properties.Resources.External_Page_Icon);

default:
return
PictureDispConverter.ToIPictureDisp(Properties.Resources.External_Unread_Icon);

}

What am I doing wrong?!

Thanks for any help you can offer me,

Dave

d.j.hi...@hotmail.co.uk

unread,
Jul 11, 2007, 9:35:49 AM7/11/07
to
I think I understand now.

My form region was working on top of a custom form which will try to
use default icons and the GetFormRegionIcon method won't get called
for the replied/forwarded icons.

If I use a new message class without a custom form the icons display
correctly.

But now I have a new question -

If the messageclass is only defined in the registry (Outlook
\Formregions\...) how can I make the reply/reply to all/forward
actions on the standard toolbars do so using this messageclass when
the mail being replied to has this form region displayed?

Thanks,
Dave

d.j.hi...@hotmail.co.uk

unread,
Jul 11, 2007, 9:56:08 AM7/11/07
to
I've answered my own question again -

See 'How to: Modify a Built-in Action for a Form Region':
http://msdn2.microsoft.com/en-us/library/bb177032.aspx

d.j.hi...@hotmail.co.uk

unread,
Jul 11, 2007, 11:04:45 AM7/11/07
to
OK I've hit another obstacle.

The above method works fine when replying from the 'read mail'
inspector, however there are several other ways to reply to an email
in Outlook:
- 'Actions' -> 'Reply'
- Built in 'Reply' button on Standard CommandBar.
- Right click mail item and select 'Reply'.

And I'm sure there are others, but all of these methods reply using
the standard IPM.Note message, despite setting the target form element
on the formregion manifest.


<customActions>
<action name="reply">
<targetForm>IPM.Note.MyMessageClass</targetForm>
<subjectPrefix>RE</subjectPrefix>
</action>
...
</customActions>


Is there a simple way of making the aforementioned replying methods
generate a reply mail item using my custom messageclass?

Thanks,
Dave

d.j.hi...@hotmail.co.uk

unread,
Jul 12, 2007, 4:36:50 AM7/12/07
to
Something else interesting happens -

If I reply to a mail with my custom message class, using the standard
Explorer's reply button it will open a new standard IPM.Note message.
(Not what I want!)

However,

If I open the mail with my custom message class in an inspector first,
then use the Inspector's reply button it correctly opens a new
IPM.Note.MyMessageClass message.

NOW if I try replying again to this same message using the Explorer
reply button it opens a new IPM.Note.MyMessageClass message, as I
wanted in the first instance.


Why is this happening?! And how can I make it reply using my custom
message class ALL the time?

Thanks,
Frustrated Dave

Sue Mosher [MVP-Outlook]

unread,
Aug 6, 2007, 9:22:00 PM8/6/07
to
According to Microsoft, it looks like you've run into some bugs related to form regions. No word yet on workarounds.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


<d.j.hi...@hotmail.co.uk> wrote in message news:1184229410.7...@m3g2000hsh.googlegroups.com...

0 new messages