728x90
반응형
728x170
using Microsoft.Office.Interop.Outlook;
Folder parentFolder = Application.ActiveExplorer().Session.Folders[1].Folders["Sales Force"] as Folder;
Folder testFolder = parentFolder.Folders["Test"] as Folder;
StorageItem storageItem = testFolder.GetStorage("SalesForce", OlStorageIdentifierType.olIdentifyBySubject);
storageItem.UserProperties.Add("SFID", OlUserPropertyType.olText).Value = "SFID3";
storageItem.Save();
※ 첫번째 계정 아래에 "Sales Force" 폴더와 그 하위 폴더 "Test"가 생성되어 있어야 한다.
※ 동일한 속성명으로 추가하는 경우 예외가 발생하지 않고 업데이트가 된다.
728x90
반응형
그리드형(광고전용)
'C# > Outlook' 카테고리의 다른 글
[C#/OUTLOOK] 폴더/메일 항목 사용자 속성 추가/조회/삭제하기 (0) | 2021.07.30 |
---|---|
[C#/OUTLOOK] MAPIFolder 인터페이스 : PropertyAccessor 속성을 사용해 사용자 속성 추가/조회/삭제하기 (0) | 2021.07.20 |
[C#/OUTLOOK] MAPIFolder 인터페이스 : GetStorage 메소드를 사용해 폴더 사용자 속성 추가/조회하기 (0) | 2021.07.20 |
[C#/OUTLOOK] MAPIFolder 인터페이스 : GetStorage 메소드를 사용해 폴더 사용자 속성 값 제거하기 (0) | 2021.07.19 |
[C#/OUTLOOK] MAPIFolder 인터페이스 : GetStorage 메소드를 사용해 폴더 사용자 속성 값 구하기 (0) | 2021.07.19 |
[C#/OUTLOOK] ExplorerEvents_10_Event 인터페이스 : FolderSwitch 이벤트 사용하기 (0) | 2021.07.15 |
[C#/OUTLOOK] Explorer 인터페이스 : Selection 속성 사용하기 (0) | 2021.07.08 |
[C#/OUTLOOK] Explorer 인터페이스 : Selection 속성을 사용해 선택 메일 항목 열거 가능형 구하기 (0) | 2021.07.08 |
[C#/OUTLOOK] 메일 컨텍스트 메뉴에서 커스텀 컨텍스트 메뉴 추가하기 (0) | 2021.07.05 |
[C#/OUTLOOK] 폴더 컨텍스트 메뉴에서 커스텀 컨텍스트 메뉴 추가하기 (기능 개선) (0) | 2021.07.05 |
댓글을 달아 주세요