GoBack Command Switches to Another Document

ID: Q101453


The information in this article applies to:
  • Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a


SYMPTOMS

If you run the GoBack command in a WordBasic macro, or by pressing SHIFT+F5, Word for Windows may switch to another open document.


CAUSE

This behavior occurs because the GoBack command operates at the Word session level rather than the Word document level. In other words, GoBack toggles between the last three selections where text or formatting has changed in any document that is still open.

As a result, the GoBack macro may go to an unexpected location whenever more than one document is open in Word. For example, if you use the GoBack command in an AutoOpen macro to position the insertion point at its last editing position, Word may position the insertion point in another open document instead. The following is a sample AutoOpen macro that uses the GoBack command:


   Sub MAIN
      GoBack
   End Sub 


MORE INFORMATION

The GoBack WordBasic command switches among the last three locations in currently open documents in which text or formatting has changed. The GoBack command is the equivalent of pressing SHIFT+F5 in a Word for Windows document. If only one document is open, the GoBack command switches among the last three selections in that document.

For information about how to do this in Word 97, please see the following article in the Microsoft Knowledge Base:

Q160021 Word 97: Goback Method Switches to Another Document


REFERENCES

"Using WordBasic," by WexTech Systems and Microsoft, page 229

"Microsoft WordBasic Primer," Russell Borland, pp. 67-68

Additional query words: 2.0 1.0 winword 7.0 word95 word7 word6 1.10a winword2 6.0

Keywords :
Version : WINDOWS:1.0,1.1,1.1a,2.0,2.0a,2.0a-CD,2.0b,2.0c,6.0,6.0a,6.0c,7.0,7.0a
Platform : WINDOWS
Issue type :


Last Reviewed: December 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.