Muokkaa

Jaa


Folder.GetCustomIcon method (Outlook)

Returns an IPictureDisp object that represents the custom icon for the folder.

Syntax

expression.GetCustomIcon

expression A variable that represents a Folder object.

Return value

An IPictureDisp object that represents a custom icon for the folder.

Remarks

The returned IPictureDisp object has its Type property equal to PICTYPE_ICON or PICTYPE_BITMAP.

GetCustomIcon returns Null (Nothing in Visual Basic) if the folder does not have a custom folder icon, or if the folder belongs to one of the following groups of folders:

  • Default folders (as listed by the OlDefaultFolders enumeration)

  • Special folders (as listed by the OlSpecialFolders enumeration)

  • Exchange public folders

  • Root folder of any Exchange mailbox

  • Hidden folders

You can only call GetCustomIcon from code that runs in-process as Outlook. An IPictureDisp object cannot be marshaled across process boundaries. If you attempt to call GetCustomIcon from out-of-process code, an exception occurs.

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.