WORKAROUND
To work around this problem and return to the previous editing location
within a document, use one of the following methods.
Method 1: Set a Permanent Bookmark
When you run the macro, the insertion point will go to this bookmark
location.
The following macro creates a bookmark called "mark" at the insertion
point.
NOTE: If the document that contains the bookmark is not open, you will
receive an error.
Sub SetBookMark()
On Error Resume Next
Selection.Bookmarks.Add Name:="YourBookmarkName"
If Err > 0 Then MsgBox Err.Description
End Sub
The following macro returns the insertion point to the bookmark you set.
Sub GoToMark()
On Error Resume Next
Selection.GoTo What:=wdGoToBookmark, Name:="mark"
If Err > 0 Then MsgBox Err.Description
End Sub
For more information about adding bookmarks, click the Office Assistant
while in the Visual Basic Editor, type
Add Bookmark, click Search, and
then click to view "Add Method(Bookmarks Collection)."
NOTE: If the Assistant is hidden, click the Office Assistant button on the
Standard toolbar. If the Assistant is not able to answer your query, please
see the following article in the Microsoft Knowledge Base:
176476
OFF: Office Assistant Not Answering Visual Basic Questions
Method 2: Set a Named Range
The named range exists only while the macro is running. You can return to
the named location from within any document while the document that
contains the named range is open.
NOTE: If the document that contains the named range is not open, you will
receive an error message.
The following macro defines a range called "MyRange" at the insertion
Sub SetRangeMark()
On Error Resume Next
Set MyRange = Selection.Range
If Err > 0 Then MsgBox Err.Description
End Sub
The following macro returns the insertion point to the range set in the
previous example:
Sub GoToRangeMark()
On Error Resume Next
MyRange.Select
If Err > 0 Then MsgBox Err.Description
End Sub
For more information about Range Method, click the Office Assistant while
in the Visual Basic Editor, type
Range Method click Search, and then
click to view "Range Method."
NOTE: If the Assistant is hidden, click the Office Assistant button on the
Standard toolbar. If the Assistant is not able to answer your query, please
see the following article in the Microsoft Knowledge Base:
176476
OFF: Office Assistant Not Answering Visual Basic Questions