728x90
728x170
■ Account 인터페이스의 Session 속성을 사용해 해당 메일 계정의 받은 편지함 폴더를 구하는 방법을 보여준다.
▶ 예제 코드 (C#)
using Microsoft.Office.Interop.Outlook;
using System.Text;
using System.Windows.Forms;
StringBuilder stringBuilder = new StringBuilder();
foreach(Account account in Application.Session.Accounts)
{
stringBuilder.AppendLine(account.DisplayName);
MAPIFolder folder = account.Session.GetDefaultFolder(OlDefaultFolders.olFolderInbox);
stringBuilder.AppendLine($" {folder.FullFolderPath}");
}
MessageBox.Show(stringBuilder.ToString());
※ Application은 Microsoft.Office.Tools.Outlook.OutlookAddInBase 클래스의 속성이다.
728x90
그리드형(광고전용)