Search code examples
c#drag-and-droppowerpoint-2010

set the Shape.Selection ( to Unselect or disSelecte) in powerpoint 2010


been trying to figure out if there is any property in Powerpoint Library C# for the shape Object that can set to be un-select. even on Selection when Mouse Drag event takes place, we can some stop the dragging of the shape object through its un-select property.

        if (isClickedHorizontalLabel && m_SelectedHorizontalLabel!=null) 
        {
           //the method doesnt helps in stopping unselecting it.
            m_SelectedHorizontalLabel.LabelShape.PPTShape.Select(Office.MsoTriState.msoFalse); 
        }

Solution

  • any current selection can be unselected with the help of Unselect Property of PowerPoint.Application method. Following is the example

            //SK: Stopped the Dragging of Horizontal Label -- Date:27-06-2014
    
            if (isClickedHorizontalLabel)
            {
                pptApp.ActiveWindow.Selection.Unselect() ;
    
            }