728x90
728x170
■ MailItem 인터페이스의 PropertyAccessor 속성을 사용해 메시지 ID를 구하는 방법을 보여준다.
▶ 예제 코드 (C#)
using Microsoft.Office.Interop.Outlook;
#region 메시지 ID 구하기 - GetMessageID(mailItem)
/// <summary>
/// 메시지 ID 구하기
/// </summary>
/// <param name="mailItem">메일 항목</param>
/// <returns>메시지 ID</returns>
public string GetMessageID(MailItem mailItem)
{
const string PR_INTERNET_MESSAGE_ID_W_TAG = "http://schemas.microsoft.com/mapi/proptag/0x1035001F";
string messageID = mailItem.PropertyAccessor.GetProperty(PR_INTERNET_MESSAGE_ID_W_TAG) as string;
return messageID;
}
#endregion
728x90
그리드형(광고전용)
'C# > Outlook' 카테고리의 다른 글
[C#/OUTLOOK] Application 인터페이스 : ItemSend 이벤트에서 메일 발송 취소하기 (0) | 2021.10.05 |
---|---|
[C#/OUTLOOK] Application 인터페이스 : Explorers 속성/ActiveExplorer 메소드 사용하기 (0) | 2021.10.05 |
[C#/OUTLOOK] Application 인터페이스 : Inspectors 속성/ActiveInspector 메소드 사용하기 (0) | 2021.10.05 |
[C#/OUTLOOK] Attachment 인터페이스 : PropertyAccessor 속성을 사용해 첨부 파일 표시 여부 설정하기 (0) | 2021.08.11 |
[C#/OUTLOOK] MailItem 인터페이스 : 메일 작성시 내장 이미지 사용하기 (0) | 2021.08.11 |
[C#/OUTLOOK] IOleWindow 인터페이스 : GetWindow 메소드를 사용해 아웃룩 윈도우 핸들 구하기 (0) | 2021.08.10 |
[C#/OUTLOOK] 누겟 설치 : Microsoft.VisualStudio.OLE.Interop (0) | 2021.08.10 |
[C#/OUTLOOK] 애드인 모듈 버전 구하기 (0) | 2021.08.10 |
[C#/OUTLOOK] Application 인터페이스 : Version 속성을 사용해 아웃룩 버전 구하기 (0) | 2021.08.10 |
[C#/OUTLOOK] 설치 디렉토리 경로 구하기 (0) | 2021.08.07 |