Back from a find

R

Rees

Is there a keyboard combination that will take me back from a Find to the
previous insertion point? Thanks.
 
R

Rees

Thanks. I am asking, however, about the previous insertion point rather
than the previous edit point.
 
S

Stefan Blom

I'm not sure I understand the difference. Do you mean go back to the
previous occurrence of the word you are searching for? If this is the
case, do the following: In the Find dialog box, click More. Under
"Search", specify "Up" rather than All, and then click "Find Next".

Does that help?
 
R

Rees

I am in a document. The cursor insertion point is somewhere. I do a Find.
It takes me somewhere else. I want to go back to the cursor insertion
point.
 
G

Greg Maxey

Rees,

This might work for you. It inserts a bookmark at your insertion point and
then returns the bookmark and deletes it after you eixt the find dialog.


Sub FindAndGoBack()

' Macro created August 2, 2004 by Gregory K. Maxey

Dim dlgFind As Dialog

Set dlgFind = Dialogs(wdDialogEditFind)

With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="IPMark"
.DefaultSorting = wdSortByName
.ShowHidden = True
End With
With dlgFind
.Find = ""
.Show

End With

Selection.GoTo What:=wdGoToBookmark, Name:="IPMark"
ActiveDocument.Bookmarks("IPMark").Delete
End Sub
 
R

Rees

Thanks. Won't do the trick, but I'll find a workaround. I would have sworn
there was a keyboard combination for this.
 
G

Greg

Rees,

What part of the trick won't it do? Just curious. There
is room for improvement, but it seems to do what you ask.
Basically you have to somehow mark the insertion point
before going off on a find venture and then provide some
means of going back to it.

In actual use, I would probably split the macro. Use
EditFind1 to place the bookmark and execute the find and
FindGoBack to return to the insertion point and deltete
the bookmark. You could assign both to a keyboard shortcut.



Sub EditFind1()

' Macro created August 2, 2004 by Gregory K. Maxey

Dim dlgFind As Dialog

Set dlgFind = Dialogs(wdDialogEditFind)

With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="IPMark"
.DefaultSorting = wdSortByName
.ShowHidden = True
End With

On Error GoTo ErrHandler
With dlgFind
.Find = ""
.Show
End With

End
ErrHandler:
MsgBox "Word has finished searching the document."
End Sub


Sub FindGoBack()
Selection.GoTo What:=wdGoToBookmark, Name:="IPMark"
ActiveDocument.Bookmarks("IPMark").Delete
End Sub
 
R

Rees

I really do appreciate your interest. I haven't made the use clear, and
this is not close to workable given the use. I have a satisfactory
workaround in place. If you are just intellectually interested in the
actual use and the reason this doesn't work, I'd be happy to continue the
discussion. Thanks again.
 
C

Chad DeMeyer

Rees,

From Microsoft Word help:
"Return to a previous editing location
Word keeps track of the last three locations where you typed or edited text."



To return to a previous editing location, press SHIFT+F5 until you reach the location you want.

Note: You can also use this feature to return to a previous location after saving your document.



Regards,

Chad
 
G

Greg

Rees,

Yes, I am interested.
-----Original Message-----
I really do appreciate your interest. I haven't made the use clear, and
this is not close to workable given the use. I have a satisfactory
workaround in place. If you are just intellectually interested in the
actual use and the reason this doesn't work, I'd be happy to continue the
discussion. Thanks again.




.
 
R

Rees

This is a toolbar made for reviewing long, complex documents. Some of the
toolbar items are searches. Edits are never or rarely made, so <Shift-F5>
is not relevant. So the user will hit toolbar items and sometimes cursor
down and review conventionally, then hit another toolbar item. Often on
hitting a toolbar item he will want to then return to where he was, and
continue the review from there. But the toolbar item might have taken him
20 pages away. Needs an easy way to get back. An analogy is the nice
implementation in Word for getting back after a link from a TOC.
 
S

Suzanne S. Barnhill

If the user has not moved the insertion point, Spacebar + Backspace will do
the trick. That is, when you use Find, the insertion point is moved to the
found item. But if you use the scroll bar (not the mouse or cursor) to
scroll up/down and view adjacent text, the insertion point is not moved, and
any typing will be inserted at the insertion point and will bring it back
into view. This would be a user training issue, however, since it would
require users to use the scroll bar (elevator only--not the arrow keys) so
as not to move the insertion point.
 
C

Chad DeMeyer

Rees,

Ctrl + Alt + Z is the shortcut key combo for "Go Back", which moves to the
previous selection regardless of whether edits were made. Should be exactly
what you need.

Regards,
Chad
 
G

Greg

Rees,

OK. I still think you could assign these two macros to
the toolbar.

Find() - inserts a bookmark at the insertion point then
goes off and does the find.

GoBack() - Returns to and deletes the bookmark.

Sub Find()

Dim dlgFind As Dialog
Set dlgFind = Dialogs(wdDialogEditFind)

With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="IPMark"
.DefaultSorting = wdSortByName
.ShowHidden = True
End With

On Error GoTo ErrHandler
With dlgFind
.Find = ""
.Show
End With

End
ErrHandler:
MsgBox "Word has finished searching the document."
End Sub

Sub GoBack()
Selection.GoTo What:=wdGoToBookmark, Name:="IPMark"
ActiveDocument.Bookmarks("IPMark").Delete
End Sub
 
R

Rees

Thanks for the several responses. Ctrl-Alt-Z is the combination I was
looking for. Are these published in a single place?
 
C

Chad DeMeyer

In Word help, look up "keyboard shortcuts", then look for subcategory "Find
text and navigate through documents".

Regards,
Chad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top