You are on page 1of 2

GoBack (Shift+F5) doesn't work in some newly-opened documents Page 1 of 2

Search Search Tips


The Word MVP Site
Word Home Word:mac Word General Troubleshoot Tutorials About Us Contact

Up to Word Application
Errors GoBack (Shift+F5) doesn't work in some newly-opened documents
Errors affecting entire
application
Article contributed by Andria Pinson and Dave Rado
Problems opening Word

Re-registering Word
Background
Resetting menus and toolbars One of the most useful Word shortcuts is Shift+F5, which invokes the GoBack command and returns the
selection to the previous editing point. It's useful both while editing (for instance, having copied something, to
Insufficient memory errors
return to where you were typing previously in order to paste); and when you open a document, in order to
Why is my “Blank Document” return to where you edited it last.
not blank?
When editing, Shift+F5 goes back to up to three editing points, and when you press it a fourth time, it returns
My drop-down menus crawl
to where you started. When you open a document, it only “remembers” the last editing point.
down very slowly

Files opened for editing are Either way, it works by storing a built-in bookmark called \PrevSel1 in the document, which it can then return
read-only to; and in fact, instead of using the Shift+F5 shortcut, you can select Edit + Go To (or press F5), select
Delete (or Backspace) doesn't
“Bookmark” in the left pane, type \PrevSel1 on the right, and click the “Go to” button. (Here's a challenge for
work you – try to find the list of built-in bookmarks in Word's Help! Given up? Fortunately, they are all listed in
Microsoft Knowledge Base article Q212555.)
Some of the tabs in Tools |
Options look strange Some people like to take advantage of this by having Word automatically open their most recent file when they
Equation Editor error open Word, and retuning the selection automatically to the last editing point, so they can carry on typing where
messages they left off. For details of how to do this, see: How to get the most recently used document to be opened
Mail merge unavailable after
automatically when you open Word.
using the Find Record feature

Word insists on asking “Open The bug


as read-only?”
If using Word 2000 or higher, you will notice that some files you open won't “go back” when you press
Switching view hides the
currently selected heading Shift+F5.

Frequently encountered This is because in Word 2000 and above, the \PrevSel1 bookmark isn't set in the last document that's closed
problems with fonts when you exit Word, if you select “Yes” to save the changes to the document.
Word shows only one or two In fact, in this scenario, even if the \PrevSel1 bookmark exists prior to closing the document, it's actually
fonts in its font list
destroyed when the document is saved!
Forcing the Task Pane visible
This bug, which doesn't apply in Word 97, is a little reminiscent of the bug described in the first paragraph of
Table borders won’t print the article: A Pseudo DocumentBeforeClose Event).
Individual document errors
“Page X of Y” displays or The fix
prints as “Page 1 of 1
Put the following code into Normal.dot:
Formatting applied to one
paragraph affects the entire Option Explicit
document

Whenever I open a document


Dim DocWasClosed As Boolean
all my formatting is gone
Sub DocClose()
Text at the top of the page is 'Set a variable so that the AutoClose macro knows not to quit Word
unaccountably indented On Error Resume Next
DocWasClosed = True
GoBack (Shift+F5) doesn't WordBasic.DocClose
work in some newly-opened If Err Then DocWasClosed = False
documents
End Sub
Mirror margins don't work in a
multisection document
Sub FileClose()
Recovering a corrupt 'Set a variable so that the AutoClose macro knows not to quit Word
document or template On Error Resume Next
DocWasClosed = True
Recovering a Master WordBasic.DocClose
Document If Err Then DocWasClosed = False
Word is always making End Sub
changes I don't expect

Graphics have turned into red Public Sub AutoClose()


X's On Error Resume Next
If Documents.Count = 1 Then
Graphics keep reverting to 'make sure the doc is not in another application such as IE, Outlook, etc
their original size If Not ActiveWindow.Caption = "" Then
Captions don't update and
'make sure it's "dirty"
don't appear in Table of If Not ActiveDocument.Saved Then
Figures 'Make sure it was not closed by invoking DocClose or FileClose commands
If Not DocWasClosed Then
Graphics don't appear or 'Create an extra "dummy" document, _
won't print to prevent the "last doc" bug from manifesting
Documents.Add Visible:=False
Positioning floating objects 'Can't quit Word yet or you get an error, so use OnTime
Floating objects in tables are Application.OnTime When:=Now, Name:="FinishOffAutoClose"
wrongly aligned vertically End If
End If
Linked floating graphics don't End If
show up in Edit Links End If
'Reset the variable
Layout changes on a different DocWasClosed = False
computer
End Sub
{ =SUM(ABOVE) } answer
was obviously incorrect
Sub FinishOffAutoClose()
Spelling and Grammar is Application.Quit
greyed out End Sub

http://word.mvps.org/FAQs/AppErrors/GoBackFix.htm 12/1/2008
GoBack (Shift+F5) doesn't work in some newly-opened documents Page 2 of 2

Sub FileExit()
Mail merge field names have Application.Quit
an underscore appended to End Sub
them

Macros/VBA/VB errors Notes: You have to use AutoClose rather than AutoExit or DocumentBeforeClose, because the latter both fire
“Invalid Page Fault” when after the “Do you want to save changes” messages. Unfortunately, this means the code must be stored in
running a macro Normal.dot (or in all your templates, but it can't be stored in an Add-in).
“Microsoft Forms: Could not
load an object”
The FileExit macro is required because without it, invoking File + Exit won't allow you to cancel out of the "do
you want to save changes" dialog, for some weird reason!
“Undefined Variable” – Mid,
Left, Right not working

Problem running a UserForm


from an Autoexec macro

Word 2000 can't be made


visible, and/or doesn't trigger
a Close Event

When users starts Word they


activate a previously created
instance

Paragraph borders lost when


printing from a VBA macro

Toolbars not showing when


automating Word

All other UserForm controls


disabled after displaying a
message box

Terms of Use Disclaimer Privacy Statement Contact Site Map Page Last Updated: Mar 08, 2008

http://word.mvps.org/FAQs/AppErrors/GoBackFix.htm 12/1/2008

You might also like