Use
Dim myrange As Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="[ppi]", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True
Set myrange = Selection.Bookmarks("\line").Range
If InStr(Right(myrange, 6), "[ppi]") = 1 Then
myrange.Delete
Else
myrange.Collapse wdCollapseEnd
End If
Loop
End With
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP, originally posted via msnews.microsoft.com