Share via

keyboard shortcut to switch between panels

Anonymous
2016-04-12T15:03:53+00:00

I splitted a Word docx, so I can see the same doc at two different areas of that doc however at the same Window

which is the keyboard shortcut to swap panels?

(I don't know if the accurate word is panels or pane or whatever)

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Jay Freedman 207.5K Reputation points Volunteer Moderator
    2016-04-20T16:31:07+00:00

    That isn't supposed to happen, because each pane maintains its own Selection object. When I switch panes, with or without a macro, the cursor always goes to its previous position in that pane.

    Still, it is possible to force the cursor to the previous position in case that isn't working for you. Here's a modified macro that should do it.

    Dim Pane1Range As Range

    Dim Pane2Range As Range

    Sub SwitchPanes()

    With ActiveDocument.ActiveWindow

        If .ActivePane.Index = 1 Then

            Set Pane1Range = .Panes(1).Selection.Range

            .Panes(2).Activate

            If Not Pane2Range Is Nothing Then

                Pane2Range.Select

            End If

        Else

            Set Pane2Range = .Panes(2).Selection.Range

            .Panes(1).Activate

            If Not Pane1Range Is Nothing Then

                Pane1Range.Select

            End If

        End If

    End With

    End Sub

    Note that the two Dim statements must appear before the Sub statement (this is somewhat unusual, but it's necessary to make the variables keep their values from one run of the macro to the next).

    0 comments No comments

Answer accepted by question author

  1. Jay Freedman 207.5K Reputation points Volunteer Moderator
    2016-04-13T19:52:34+00:00

    This macro seems to work, although I'm not quite confident that it will always activate the correct pane regardless of what other panes are visible. If it misbehaves, post back and tell me what happened.

    Sub SwitchPanes()

    With ActiveDocument.ActiveWindow

        If .ActivePane.Index = 1 Then

            .Panes(2).Activate

        Else

            .Panes(1).Activate

        End If

    End With

    End Sub

    0 comments No comments

12 additional answers

Sort by: Most helpful
  1. Jay Freedman 207.5K Reputation points Volunteer Moderator
    2016-04-12T15:22:26+00:00

    'Pane' is the correct term.

    By default, the NextPane command is assigned to the F6 function key, and the PrevPane command is assigned to Shift+F6.

    However, Word considers the ribbon, the status bar, and task panes such as the Navigation pane and the Styles pane to be panes, too. That means you may have to hit F6 three or four times to go from the top part of a split window to the bottom part, and the number of presses it takes will depend on what is visible at the moment.

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2016-04-13T21:41:53+00:00

    thanks, let me try...

    is it supposed to toggle?

    0 comments No comments
  3. Anonymous
    2016-04-12T16:00:51+00:00

    very complicated !

    is it not possible to create a macro for that? ie, that just by pressing a shortcut to switch only between the splitted windows?

    0 comments No comments