![]() |
#1
|
|||
|
|||
![]()
Hi
I'm using this code to select text between two key phrases ; Code:
Dim myrng As Range, endrng As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(findText:="MORE INFO ABOUT THE ITEM ", MatchCase:=True, Forward:=True, Wrap:=wdFindStop) = True Set myrng = Selection.Range Loop End With Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(findText:="ITEM NUM : ", MatchCase:=True, Forward:=True, Wrap:=wdFindStop) = True Set endrng = Selection.Range Loop End With myrng.End = endrng.End myrng.Select I'd like it to select all of the specific occurences in the passage. If there are several times when the two inputs phrases can be found then it should find and select all occurences discretely. Can someone advise with some modification or alternative code? Grateful for any help. Last edited by macropod; 06-24-2012 at 04:29 PM. Reason: Added code tags & formatting |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about selecting text w/mouse | Jazz43 | Word | 3 | 11-29-2011 11:58 PM |
Selecting styled text | Caroline | Word | 5 | 02-15-2011 12:55 PM |
![]() |
TinaIgnatiev | Word | 1 | 12-22-2010 01:42 PM |
![]() |
speedycorn1 | Word | 3 | 11-01-2010 02:58 PM |
Selecting a Text Box | gajesh | Word | 0 | 09-02-2009 11:45 PM |