BUG Word 2013: Selection in Word disappears after running code

Since the release of Word 2013 we’ve been seeing sporadic complaints in the Word forum from developers that the selection highlighting disappears after their code executes. Only yesterday did someone post steps to reproduce the issue that worked consistently.

It turns out that this is, indeed, “unexpected behavior”. Apparently the screen redraw isn’t firing as it should.

There is a workaround, although it’s not ideal as it causes some screen flicker:

The Application.ScreenRefresh method will make the selection highlighting visible, again.

Changing the zoom factor should also work.



2 Responses to “BUG Word 2013: Selection in Word disappears after running code”

  1.   Rahul Says:

    The suggested solution works for the main word canvas, but it’s not working for comments pane.
    Say i have a word document with some text and comments inserted.

    Invoke this macro :
    activedocument.activewindow.View.SplitSpecial = wdPaneComments

    which will open up the comments pane (just make sure it’s commenst pane not revisions pane). Try selecting any text .. you won’t be able to.

    Same scenario works fine in word 2010.

    Also, place the cursor on comment text and select some text with SHIFT + left arrow key. Now,If I change zoom level of the document , i can see the selection blinking, but its not retaining.

    Application.ScreenRefresh isn’ t helping either.

    •   WordMeister Says:

      Hi Rahul
      Sorry about the late response – WordPress hasn’t been notifying me about Comments coming in so I only just saw this…
      I believe the reason may be that 1) The old Comments Pane you’re invoking was deprecated long, long ago and 2) Word 2013 received a new graphics/layout engine which probably was never tested for supporting this pane.

Leave a Reply