示例#1
0
 private void btnRemoveAnimations_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         PowerPoint.Presentation presentation = Globals.ThisAddIn.Application.ActivePresentation;
         ToolsAndFormatting.RemoveAnimations(presentation);
     }
     catch (Exception ex)
     {
         Exceptions.Handle(ex);
     }
 }
示例#2
0
 private void btnFormatTable_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         PowerPoint.Table pptTable = Globals.ThisAddIn.Application.ActiveWindow.Selection.ShapeRange[1].Table;
         ToolsAndFormatting.FormatTable(pptTable);
     }
     catch (Exception ex)
     {
         Exceptions.Handle(ex);
     }
 }
示例#3
0
 private void btnFormatBullets_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         PowerPoint.Selection selection = Globals.ThisAddIn.Application.ActiveWindow.Selection;
         ToolsAndFormatting.FormatBullets(selection);
     }
     catch (Exception ex)
     {
         Exceptions.Handle(ex);
     }
 }
示例#4
0
 private void btnLineBelow_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         PowerPoint.DocumentWindow window = Globals.ThisAddIn.Application.ActiveWindow;
         ToolsAndFormatting.LineBelow(window);
     }
     catch (Exception ex)
     {
         Exceptions.Handle(ex);
     }
 }
示例#5
0
 private void toggleWordWrap_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         PowerPoint.Selection selection = Globals.ThisAddIn.Application.ActiveWindow.Selection;
         ToolsAndFormatting.ToggleWordWrap(selection, ((RibbonToggleButton)sender).Checked);
         // After this, we need to re-check the controls
         checkSelectionBoxes(selection);
     }
     catch (Exception ex)
     {
         Exceptions.Handle(ex);
     }
 }
示例#6
0
 private void btnSetLanguage_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         if (e.Control.Id == btnSetLanguageEnglish.Id)
         {
             ToolsAndFormatting.SetLanguage(Globals.ThisAddIn.Application.ActivePresentation.Slides, Office.MsoLanguageID.msoLanguageIDEnglishUS);
         }
         else if (e.Control.Id == btnSetLanguageFinnsh.Id)
         {
             ToolsAndFormatting.SetLanguage(Globals.ThisAddIn.Application.ActivePresentation.Slides, Office.MsoLanguageID.msoLanguageIDFinnish);
         }
     }
     catch (Exception ex)
     {
         Exceptions.Handle(ex);
     }
 }