none
How to set icon of a Outlook region? RRS feed

  • Question

  • Hi,

    I use VB.NET to create a region in Outlook (please see the following). How can I specify the icon of the region in run-time?

    Remark: I have the images in a imagelist

    Thanks,

    Cowcow


    • Edited by cowcow222 Wednesday, July 30, 2014 11:13 AM
    Wednesday, July 30, 2014 11:12 AM

Answers

All replies

  • You can specify which icons you want the form region to display by setting icon properties in the Icons property group of the Properties window. Use the following guidelines to achieve the best visual quality:
    For the Page icon, use a Portable Network Graphics (PNG) file.
    Window icons should be 32 pixels by 32 pixels.
    All other icons should be 16 pixels by 16 pixels.
    The Page icon appears on the Ribbon of an Inspector for items that have separate, replacement, or replace-all form regions.
    The Window icon appears in the notification area and in the ALT+TAB dialog box for open items that display replacement or replace-all form regions.
    You can read more about this at http://msdn.microsoft.com/en-us/library/bb386176.aspx .
    Wednesday, July 30, 2014 12:22 PM
  • If you imported a form region, icons should be specified in the manifest, see http://msdn.microsoft.com/en-us/library/office/ff868234(v=office.15).aspx .
    Wednesday, July 30, 2014 12:24 PM
  • The icons are in a imagelist, and I need to change the button image to different icon at run-time based on some criteria.

    Could you please let me know how to "setting icon properties in the Icons property group of the Properties window"?

    Thanks,

    Cowcow



    • Edited by cowcow222 Wednesday, July 30, 2014 2:19 PM
    Wednesday, July 30, 2014 2:04 PM
  • See:


    • Edited by Eugene Astafiev Wednesday, July 30, 2014 2:50 PM
    • Marked as answer by cowcow222 Friday, August 1, 2014 12:27 PM
    Wednesday, July 30, 2014 2:49 PM
  • Thank you very much.

    Now I can change the icon from  the region Icons -> Page. I use 48x48 png image. It looks much better than 16x16.

    May I ask you how I can access this property in my VB.NET code.

    I think I can change this icon in run time from:

     MyFormRegionItemFactory_FormRegionInitializing

    But I cannot find this any Page or Icons properties

     Dim formRegions As WindowFormRegionCollection = Globals.FormRegions _
                (Globals.ThisAddIn.Application.ActiveInspector())
                    formRegions.MyFormRegionItem ......

    Please help.

    Thanks,

    Cowcow

    Wednesday, July 30, 2014 10:35 PM
  • I just found that I can access it like this:

    formRegions.MyFormRegionItem.Manifest.Icons.Page

    However, I cannot access my imagelist from MyFormRegionItemFactory_FormRegionInitializing

    I am trying to do something like this:

    I have about 200 icons in my myImageList

    formRegions.MyFormRegionItem.Manifest.Icons.Page = myImageList.images(x)

    x can be any number 1 ~200.

    Is that possible? 

    Regards,

    Cowcow

    Wednesday, July 30, 2014 10:40 PM
  • I would assume it's not possible.

    Thanks.

    Friday, August 1, 2014 12:27 PM