Пример #1
0
 private void btnSafeView_Click(object sender, RibbonControlEventArgs e)
 {
     Explorer exp = Globals.ThisAddIn.Application.ActiveExplorer();
     if (exp.Selection.Count > 0)
     {
         frmPreview objPreview = new frmPreview();
         objPreview.ClearItems();
         foreach (object objItem in exp.Selection)
         {
             if (objItem is MailItem || objItem is PostItem)
                 objPreview.Items.Add(objItem);
         }
         objPreview.ShowDialog();
     }
 }
Пример #2
0
 private void SafeView(Office.CommandBarButton btn, ref bool cancel)
 {
     Explorer exp = Globals.ThisAddIn.Application.ActiveExplorer();
     if (exp.Selection.Count > 0)
     {
         frmPreview objPreview = new frmPreview();
         objPreview.ClearItems();
         foreach (object objItem in exp.Selection)
         {
             if (objItem is MailItem || objItem is PostItem)
                 objPreview.Items.Add(objItem);
         }
         objPreview.ShowDialog();
     }
 }