Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
     }
 }