Invert selection - script please

I want to select all the objects by ignoring the active selection, that too this happened 
within the active group selection and not normal outside.  this script is for active group

selection.

By holding the Control Key, i made a selection, now i run the script, now i want the invert

selection within that group only

Parents
  • Sub InvertSelection()

    Dim sr As ShapeRange

    On Error GoTo ErrHandler

    ActiveDocument.BeginCommandGroup "Invert Selection"
    Set sr = ActiveDocument.SelectionRange
    ActivePage.Shapes.All.CreateSelection
    sr.RemoveFromSelection

    ExitSub:
    ActiveDocument.EndCommandGroup
    Exit Sub

    ErrHandler:
    MsgBox "Error occured: " & Err.Description
    Resume ExitSub

    End Sub

Reply Children
No Data