I know I've asked before but what code can I use to refresh" from this state?

I made a macro that does several things then groups the selection but it ends up in this state (round selection marks) whereby requiring me to click off the selection then back on it. tried

ActiveDocument.refresh

ActiveWindow.refresh

  • round selection marks = child objects selected, i.e. selected individual objects in group not entire group (you can check it on Object Manager)

    check two codes  below 

    Sub Macro1()
    Dim sr As ShapeRange
    Set sr = ActiveDocument.ActivePage.FindShapes.All
    sr.CreateSelection
    sr.Group
    ActiveWindow.Refresh
    End Sub


    Sub Macro2()
    Dim sr As ShapeRange
    Set sr = ActiveDocument.ActivePage.FindShapes.All
    sr.CreateSelection
    ActiveSelection.Group
    End Sub

  • agree with Mek, you need to select not all shapes in the group, but the group itself

    ...

    set sGroup = srAllShapes.Group

    sGroup.AddToSelection

  • Mek and Shark are correct, you just need to make sure all your shapes are in a shaperange and then create a selection from it. 

    The other option if you don't want it selected it to just clear the selection:

    ActiveDocument.ClearSelection

    :-)

    -Shelby