GoBack Command Switches to Another Document

Last reviewed: July 30, 1997
Article 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:

   ARTICLE-ID: Q160021
   TITLE     : 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

Kbcategory: kbusage kbmacro KBSubcategory:


Additional query words: 2.0 2.0a 2.0a-CD 2.0b 2.0c 1.0 1.10
winword 7.0 word95 word7 word6 1.10a winword2 6.0

Version : 1.x 2.x 6.0 6.0a 6.0c 7.0 7.
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.