Returning to the Last Editing Position When Opening Files

Last reviewed: July 30, 1997
Article ID: Q95694
The information in this article applies to:
  • Microsoft Word for Windows, versions 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
  • Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
  • Microsoft Word 97 for Windows

SYMPTOMS

Microsoft Word does not retain the location of your insertion point when you save and close a document.

CAUSE

This occurs by product design.

WORKAROUND

Word 7.0, 97

Press SHIFT+F5 after you open the document to move the cursor to its previous location.

Word 2.0, 6.0

The following AutoOpen macro can be used to return your insertion point to its last editing position when a document is opened:

   Sub MAIN
   If ExistingBookmark("\PrevSel1") Then EditGoTo "\PrevSel1"
   End Sub

To create the above macro:

  1. From the Tools menu, choose Macro.

  2. From the Show box, select the Global Macro option.

  3. Type AutoOpen for the macro name and choose the Edit button.

  4. Type the following macro line between the Sub MAIN and End Sub lines:

          If ExistingBookmark("\PrevSel1") Then EditGoTo "\PrevSel1"
    

  5. From the File menu, choose Close. Choose the Yes button when prompted to save changes to Global:AutoOpen.

  6. From the File menu, choose Save All. When prompted, choose to save global glossary and command changes.

MORE INFORMATION

If you want to return to a specific location each time you open a document, insert a bookmark at that location and then record an AutoNew macro that goes to that bookmark.

REFERENCES

"Using WordBasic," by WexTech Systems and Microsoft, pages 88-89 and page 184.

Kbcategory: kbusage kbmacro KBSubcategory:


Additional query words: winword2 2.0 2.0a 2.0a-CD 2.0b 2.0c
6.0.1 word7 word6 winword 7.0 word95 winword autoopen auto open 6.0
macword 7.0a 6.0.1a word97

Version : 2.x 6.0 6.0a 6.0c 7.0 7.0a


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.