![]() |
|
#5
|
|||
|
|||
|
The behavior is discussed here:
http://gregmaxey.com/word_tip_pages/..._property.html Basically: 1) we can't find a "thing" when that thing exactly matches the search range, and 2) when that thing does exactly match the search range, the dynamically redefined range is a "runaway" range. I've modified the PracticalIV code on the page to address your specific issue: Code:
Sub PracticalIV()
Dim oRng As Word.Range
'Insert a temporary range modifier.
Selection.Range.InsertAfter "~"
Selection.MoveEnd wdCharacter, 1
Set oRng = Selection.Range
'Add unique (unanticipated formatting to the modifier).
oRng.Characters.Last.Font.Bold = False
With oRng.Find
.Font.Bold = True
.Replacement.Text = "<start>^&<end>"
.Execute Replace:=wdReplaceAll
End With
'Delete the modifier.
oRng.Characters.Last.Delete
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Onenote 2013 search is not identifying search terms correctly | Delta223 | OneNote | 0 | 08-12-2014 06:40 AM |
| Search for date and then apply mutliple search criteria in huge dataset | maxtymo | Excel | 2 | 12-01-2013 04:52 AM |
| Looking for Windows Search app with ability to search by content | gopher_everett | Office | 1 | 02-28-2013 09:23 PM |
| Search Function Problem | MageWind | Excel | 2 | 06-29-2011 09:46 AM |
Windows explorer search problem...help!!
|
NewSysAdmin | Windows | 1 | 03-08-2011 05:33 PM |