0
Outlook보기에서 사용자 지정 이미지 열을 추가하고 싶습니다. 이것은 사용자 정의 아이콘을 추가하는 샘플 코드입니다.Outlook 사용자 지정 열에 비트 맵 이미지를 추가하는 방법
Outlook.Explorer explorer = this.Application.ActiveExplorer();
Outlook.Selection selection = null;
try { selection = explorer.Selection; }
catch { }
if (selection != null && selection.Count > 0)
{
object item = selection[1];
if (item is Outlook.MailItem)
{
Outlook.MailItem mail = item as Outlook.MailItem;
Outlook.UserProperties userProperties = mail.UserProperties;
Outlook.UserProperty userProperty = userProperties.Add("SyncStatus", Outlook.OlUserPropertyType.olEnumeration, true, Outlook.OlFormatEnumeration.olFormatEnumBitmap);
userProperty.Value = new Bitmap(@"...\icons\Sync.ico");
mail.Save();
Marshal.ReleaseComObject(userProperty);
Marshal.ReleaseComObject(userProperties);
}
Marshal.ReleaseComObject(item);
Marshal.ReleaseComObject(selection);
}
오류 : 'System.Runtime.InteropServices.COMException'형식의 예외가 XXXXXX.dll 에서 발생하지만
이 추가 정보 사용자 코드에서 처리되지 않은 : 데이터 유형이 지원되지 않습니다.
Outlook에 이미지 열을 추가하는 방법을 제안하십시오.