Private Sub SelectionInverse()Dim SHAPE_BhBp As Shape
For Each SHAPE_BhBp In ActivePage.Shapes
If SHAPE_BhBp.Selected = True ThenSHAPE_BhBp.Selected = FalseElseSHAPE_BhBp.Selected = TrueEnd If
NextEnd Sub
the selected property is to be used only with an object, it doesn't work for selection.
This is a code in C#, which performs the procedure, someone from VBA can easily rewrite it for you
[CgsAddInMacro] public void InvertSelection() { ShapeRange selectedRange, allRange; selectedRange = corelApp.ActiveSelectionRange; allRange = corelApp?.ActivePage.Shapes.All(); allRange.RemoveRange(selectedRange); selectedRange.RemoveFromSelection(); allRange.AddToSelection(); }