Ejemplo n.º 1
0
 public static void ApplyPosition(PowerPoint.Selection selection, PowerPointPosition point)
 {
     selection.ShapeRange[1].Left   = point.Left;
     selection.ShapeRange[1].Top    = point.Top;
     selection.ShapeRange[1].Width  = point.Width;
     selection.ShapeRange[1].Height = point.Height;
 }
Ejemplo n.º 2
0
        public static PowerPointPosition PickUpPosition(PowerPoint.Selection selection)
        {
            PowerPointPosition point = new PowerPointPosition();

            point.Left   = selection.ShapeRange[1].Left;
            point.Top    = selection.ShapeRange[1].Top;
            point.Width  = selection.ShapeRange[1].Width;
            point.Height = selection.ShapeRange[1].Height;
            return(point);
        }
Ejemplo n.º 3
0
 private void btnPickUpPosition_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         PowerPoint.Selection selection = Globals.ThisAddIn.Application.ActiveWindow.Selection;
         position = ToolsSizeAndPosition.PickUpPosition(selection);
     }
     catch (Exception ex)
     {
         Exceptions.Handle(ex);
     }
 }