dado_maker,
This can most likely be improved, but seems to work. This macro looks for
the string ????? in a paragraph object. If found, then is looks for a line
break. If the line break "is not" found then the whole paragraph
(supposedly a single line paragraph in your case) is deleted. If a line
break is found, then the the paragraph range is set to myRange, myRange is
then collasped then the end is moved to the line break + 1 (or then end of
the line including the break) and myRange is deleted.
Sub ScratchMacro()
Dim myRange As Range
Dim oPar As Paragraph
For Each oPar In ActiveDocument.Paragraphs
If InStr(oPar.Range.Text, "?????") Then
If InStr(oPar.Range.Text, Chr(11)) Then
Set myRange = oPar.Range
myRange.Collapse
myRange.MoveEndUntil (Chr(11))
myRange.MoveEnd Unit:=wdCharacter, Count:=1
myRange.Delete
Else
oPar.Range.Delete
End If
End If
Next
End Sub