Invert the current selection: select all unselected shapes
Problem
It's simple to select one or two shapes on a slide, but what if you need to select a complicated group of shapes?
Sometimes it's simpler to select the shapes you don't want and tell PowerPoint "Invert the selection".
Or it would be, but PowerPoint doesn't have a handy command like this. So we wrote a bit of VBA to give it one.
Solution
This code will unselect everything that's selected, then select everything that wasn't selected. Invert the current selection, in other words.
Sub InvertSelection() ' Invert current selection ' Anything that's selected gets unselected ' Anything that's unselected gets selected Dim x As Long Dim oSh As Shape ' Test: IS there a current selection? On Error Resume Next If ActiveWindow.Selection.ShapeRange.Count = 0 Then MsgBox "Please select one or more shapes on the current slide, then try again." Exit Sub End If ' Record current selection For Each oSh In ActiveWindow.Selection.ShapeRange Call oSh.Tags.Add("Sel", "Y") Next ' deselect everything ActiveWindow.Selection.Unselect ' select everything, filtering out previously selected items For Each oSh In ActiveWindow.Selection.SlideRange.Shapes If Len(oSh.Tags("Sel")) = 0 Then ' add it to the selection oSh.Select (msoFalse) Else ' clear the tag oSh.Tags.Delete ("Sel") End If Next End Sub