1
인사말 오버플로,Outlook 2007의 전자 메일 추적
특별히 서명 된 전자 메일에 대한 VSTO/C# 회사 전자 메일 추적기를 개발하려고합니다. 난에 의존하고있다 :
어떻게 든, 검사기 이벤트 후 언젠가 발사 중지
- Inspectors.NewInspector. 부호 확인 후 1의 본문에 2, 3 및 4를 등록합니다. 나는 이미 등록 된 검사관을 추적하려고했지만 희망은 없었습니다. 실마리가 있습니까?
업데이트 : 다음은 샘플 코드입니다. 고르게는 onSelect를과의 OnOpen은 몇 번을 발사 한 후 갑자기 정지 :
는using System; using System.Collections; using Microsoft.Office.Interop.Outlook; // using Microsoft.Office.Core; namespace eMailTrackingSystem { public enum TrackingEvent { Opened, Closed, Forwarded, Deleted } public partial class eMTSAddIn { private ArrayList trackedEmails = new ArrayList(); private void InternalStartup() { this.Application.ActiveExplorer().SelectionChange += new ExplorerEvents_10_SelectionChangeEventHandler(OnSelect); } private void OnSelect() { Selection selection = this.Application.ActiveExplorer().Selection; foreach (object item in selection) { if (item is MailItem) { MailItem email = (MailItem)item; if (email.Subject == "eMTS" && !trackedEmails.Contains(email.EntryID)) { email.Open += new ItemEvents_10_OpenEventHandler(OnOpen); trackedEmails.Add(email.EntryID); } } } } private void OnOpen(ref bool cancel) { } private void OnClose() { } } }
감사