Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Apr 2001
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switching Panes now a Pain (2000)

    In WordPerfect5.1 (ok ok) there was a handy feature allowing you to toggle among the open documents. It was invoked with the "F3" key. Ever since joining the Word bandwagon, I have programmed a simple (very simple) macro tied to the F3 key allowing me to do this. Most recently, changing from Word97 to Word2000, I found that my macro didn't work any more. Anyone offer a hand here. I just want to toggle among all the open documents. It seems that the next document/previous document doesn't view the open documents as a ring, but rather a line, so I run out of next (or previous) documents and get the following error message Runtime Error '91': Object Variable or With block variable not set. the macro is:

    ActiveWindow.Next.Activate
    End Sub

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Switching Panes now a Pain (2000)

    A more direct route would be to use a keyboard assignment. Maybe this will also solve the object reference problem.
    Attached Images Attached Images

  3. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Switching Panes now a Pain (2000)

    This macro was previously posted here, and should work:

    <pre>Public Sub NextWindow()
    'Equivalent to Ctrl+F6 (NextWindow) command
    'Gary Frieder April 2001
    Dim lngWins As Long
    lngWins = Windows.Count
    If lngWins = 1 Then
    'do nothing - no other window to switch to
    Else
    If ActiveWindow.Index = lngWins Then
    'at "last" window - go back
    Windows(1).Activate
    Else
    ActiveWindow.Next.Activate
    End If
    End If
    End Sub
    </pre>

    Gary

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Switching Panes now a Pain (2000)

    Another alternative would be to use the key sequence Control-F6 which is already configured to switch to the next window.

    StuartR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •