Key presses for changing between documents

  • Thread starter Thread starter Bert Coules
  • Start date Start date
B

Bert Coules

If I have one document open and occupying the full screen, and another
open but minimised, is there a way of swapping them over without using
a mouse?

I've looked in several lists of standard keyboard alternatives to
mouse-usage, but can't seem to find anything for this.

Thanks in advance.

Bert
http://www.bertcoules.co.uk
 
Hi Bert,

CTRL+F6 switches between documents, but if you mean you want
them to trade window states also (have the minimized become
maximized and vice versa), for that you'd need a macro, kind
of like the one below, which you could assign to a keystroke
combination:

If Documents.Count <> 2 Then
MsgBox "Cmon, make it easy, have exactly 2 docs open!"
Exit Sub
End If
With Documents(1).Windows(1)
If .WindowState = wdWindowStateMinimize Then
.WindowState = wdWindowStateMaximize
Documents(2).Windows(1).WindowState = wdWindowStateMinimize
Else
.WindowState = wdWindowStateMinimize
Documents(2).Windows(1).WindowState = wdWindowStateMaximize
End If
End With

This will require more code is either document's window is in
the "Normal" state (neither maximized nor minimized).

For how to use macros offered to you in newsgroups, see:
http://www.mvps.org/word/FAQs/MacrosVBA/CreateAMacro.htm
 
Back
Top