我正在尝试使用
此外,它期望的对象在这里,而且示例也非常简单。
有谁知道如何为文件夹设置自定义图标吗?以下是我目前所拥有的代码:
Folder.SetCustomIcon()
方法在我编程创建的已保存搜索文件夹上放置自定义图标。虽然SetCustomIcon()
文档很简洁,但可以在此处找到参考信息。此外,它期望的对象在这里,而且示例也非常简单。
有谁知道如何为文件夹设置自定义图标吗?以下是我目前所拥有的代码:
searchFolders = inboxFolder.Store.GetSearchFolders();
foreach (Outlook.Folder folder in searchFolders)
{
if (folder.Name == "Expiring Retention Policy Mail")
{
folder.ShowItemCount = Microsoft.Office.Interop.Outlook.OlShowItemCount.olShowTotalItemCount;
folder.SetCustomIcon(new Bitmap(32, 32)); // <=-- this isn't working because it's expecting stdPicture which has very sparse information on how to convert to this type.
Globals.ThisAddIn.Application.ActiveExplorer().CurrentFolder = folder;
}
}