첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

C#,OUTLOOK,INSPECTOR

using Microsoft.Office.Interop.Outlook;

Application application = Globals.CustomAddIn.Application;

Inspector inspector = application.ActiveInspector();

MailItem mailItem = inspector.CurrentItem as MailItem;

if(mailItem != null)
{
    Microsoft.Office.Interop.Word.Document document = inspector.WordEditor as Microsoft.Office.Interop.Word.Document;

    string selectedText = document.Application.Selection.Text;

    if(!string.IsNullOrWhiteSpace(selectedText))
    {
        System.Windows.Forms.MessageBox.Show(selectedText);
    }
}

※ 비주얼 스튜디오의 [참조 관리자] 대화 상자의 어셈블리/확장에서 Microsoft.Office.Interop.Word 항목을 참조한다.

728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요