Change Outlooks Messageclass-Icon

Add-in Express™ Support Service
That's what is more important than anything else

Change Outlooks Messageclass-Icon
 
BerndH




Posts: 99
Joined: 2014-09-23
Can I change the messageclass-icons in explorer-listview based on the adxolform I see?

E.g. if the mail has a signature, a special form with infos about the signature is shown. Also all mails having a signature have a "red-s"-icon, instead of the envelop with the lock?

Bernd
Posted 24 Sep, 2014 04:54:57 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Bernd,

If you talk about a custom message class item, then you define that icon when creating the custom message class.


Andrei Smolin
Add-in Express Team Leader
Posted 24 Sep, 2014 07:07:53 Top
BerndH




Posts: 99
Joined: 2014-09-23
So I can?t create a formregion and give it some icon-informations via a manifest or parameters?
Then register the region to a messageclass and the icons from manifest are used?
(maybe I?m totaly wrong with this?!)

Bernd
Posted 24 Sep, 2014 08:12:52 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Bernd,

Add-in Express forms don't use the Form Region technology; you cannot use this approach.


Andrei Smolin
Add-in Express Team Leader
Posted 24 Sep, 2014 08:39:46 Top
BerndH




Posts: 99
Joined: 2014-09-23
So I can?t change the icons with your "tools" ?!

"Add-in Express provides Outlook developers with an innovative, truly unique technology of Advanced Outlook View and Form Regions."
(http://www.add-in-express.com/add-in-net/outlook-regions-basics.php)
Posted 29 Sep, 2014 07:52:48 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
It's nice to see someone so sarcastic! Thank you!

You can find all icons available for you in Outlook 2007+ using the macro below.

I created a test folder with 2048 copies of a received email, navigated to that folder in the explorer window and run the macro. After the macro finishes, I see the icons in the explorer window; the email body of each email contains the index of the corresponding icon. Most of the icons are actually the same envelop. Scrolling the list, you'll open that available icons seems to create groups located here and there. I'm sorry if the macro above doesn't answer your needs.

Public Sub PrIconIndex()

USE THIS MACRO WITH CARE!

Dim objItems As Items
Dim mail As MailItem
Dim i As Integer

Set objItems = Application.ActiveExplorer.CurrentFolder.Items

For i = 1 To 2048
    Set mail = objItems(i)

    Call mail.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/proptag/0x10800003", i)

    mail.Body = CStr(i)
    mail.Save
Next

End Sub



Andrei Smolin
Add-in Express Team Leader
Posted 29 Sep, 2014 08:41:40 Top
BerndH




Posts: 99
Joined: 2014-09-23
No sarcasm ;-)

I only want to make shure, I understand it correct. I read "we provide form region" on your website. You wrote, you don?t use form region technology. So I?m confused. I?m new with addin express und I just created a form region shown for a special messageclass "IPM.Note.test", it works fine and now I?m searching a possibility to change the icon in the explorer bases on the messageclass

But I?m not shure if I can make it with your "tools" or if I should search deeper in the microsoft office universum for doing it (I?m new in this) ....

I also found http://www.add-in-express.com/creating-addins-blog/2010/03/31/design-outlook-form-regions/
but he?s using a ofs-File with outlook. The changed icons he does with a manifest-file. So I thought somehow it can be done with an adxolform ?!
Posted 29 Sep, 2014 10:02:21 Top
BerndH




Posts: 99
Joined: 2014-09-23
Solved it ... didn?t know it?s that easy :-)
Posted 30 Sep, 2014 03:31:06 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Bernd,

Great! Can you please give a short description of how you solved this? I believe such a description would be of help for me and other developers.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Sep, 2014 03:41:41 Top
BerndH




Posts: 99
Joined: 2014-09-23
First I created a Form in Outlook with no content (because I need nothing there).
I saved it as an ofs.

Second I created a Registry-entry for my new Messageclass:

HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\FormRegions\IPM.Note.test

There I created a new reg_SZ:

test_region = c:\temp\test_region.xml


This xml (c:\temp\test_region.xml) contains the following:


<?xml version="1.0" encoding="utf-8"?>
<FormRegion xmlns="http://schemas.microsoft.com/office/outlook/12/formregion.xsd">
  <name>FirstContactRegion</name>
  <title>Key Dates</title>
  <formRegionType>Replace</formRegionType>
  <layoutFile>c:	emp	est_region.ofs</layoutFile>
  <showCompose>false</showCompose>
  <showRead>true</showRead>
  <showPreview>true</showPreview>
   <icons>
    <!--default icon-->
     <default>c:	emp	est_region.ico</default>
  </icons>
    <version>1.0</version>
</FormRegion>


That?s it. If I change the messageclass of an mail to IPM.Note.test, the icon changes to my test_region.ico - icon.
Posted 01 Oct, 2014 04:45:52 Top