Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Search and Select Question
I use Word 2000.
I would like to select all text between the insertion point and a given word above the insertin point. I think the answer is in the use of wildcards, but I can't figure it out. Thanks for the help. George Lutz |
#2
|
|||
|
|||
GM,
AFAIK you can't find everything up to a word. You can find everything from the insertion point up to and including a word. Find: YourWord* You will need to set FindMore options to search "Up" and "Use Wildcards." You indicate that you want to select the text between the two point. If you are selecting it for the purpose of deleting it. Then you could use (YourWord)* in Find and \1 in Replace. If you need the selection for something else then you could use a macro something like: Sub ScracthMacro() Dim aWord As String aWord = InputBox("Enter the anchor word.") Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = aWord & "*" .Forward = False .MatchWildcards = True End With Selection.Find.Execute Selection.MoveStart Unit:=wdWord, Count:=1 End Sub -- Greg Maxey/Word MVP A Peer in Peer to Peer Support GMLutz wrote: I use Word 2000. I would like to select all text between the insertion point and a given word above the insertin point. I think the answer is in the use of wildcards, but I can't figure it out. Thanks for the help. George Lutz |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Thesaurus and paste in Search | Microsoft Word Help |