FormRegionStartup.GetFormRegionIcon method (Outlook)

Obtains an icon image that will be displayed for a particular type of icon for the form region.

Syntax

expression. GetFormRegionIcon( _FormRegionName_ , _LCID_ , _Icon_ )

expression A variable that represents a 'FormRegionStartup' object.

Parameters

Name Required/Optional Data type Description
FormRegionName Required String The name of the form region which is the name used when registering the form region in the Windows registry.
LCID Required Long The locale ID that identifies the language that Outlook is currently using. This value is used to obtain the localization strings corresponding to this language for the form region.
Icon Required OlFormRegionIcon A constant that identifies the type of icon.

Return value

A Variant that is either a byte-array that represents the original bytes of the image file or an IPictureDisp object.

Remarks

This method is intended to be implemented by an add-in and called by Outlook. As part of the FormRegionStartup interface, this method and the GetFormRegionManifest method provide a mechanism through which an add-in can register a form region and provide Outlook with the XML manifest and the icons for the form region.

If you would like an add-in to provide icons for a form region, specify the ProgID of the add-in when you register the form region in the Windows registry. For more information on registering a form region, see Specifying Form Regions in the Windows Registry. The add-in must implement the GetFormRegionManifest and the GetFormRegionIcon methods of the FormRegionStartup interface.

In the XML manifest for the form region, under the icons element, specify the value addin for each of the child elements where you would like to use a custom icon. Implement GetFormRegionIcon such that when Outlook passes that type of icon as an argument for Icon , GetFormRegionIcon returns the image of the custom icon. If you want Outlook to display the default icon, implement GetFormRegionIcon such that it returns null (Nothing in Visual Basic) for that type of icon. GetFormRegionIcon should also return null (Nothing in Visual Basic) when Icon is olFormRegionIconDefault.

When Outlook starts, it reads the list of form regions from the Windows registry and caches the data associated with the form regions. If a form region has been registered with a ProgID, Outlook will resort to the corresponding add-in by calling its implementation of GetFormRegionIcon for any icon in the XML manifest that has addin as the value of a child element of the icons element. Note that if you don't specify any ProgID in the Windows registry, Outlook will not call the GetFormRegionManifest and GetFormRegionIcon methods.

See also

FormRegionStartup Interface

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.