Hi,
You didn't include you code for determining where the starting point and the
ending point of the part are, so I can only demonstrate how to do this in an
example case in which the starting point is the beginning of the second word
in the sentence where the cursor is located and the ending point is the end
of the second word. Note that the sentence must have three or more words for
the macro to work correctly.
Sub ReplaceRangeInSentence()
Dim NewText As String
Dim MyRange As Range
NewText = InputBox("Type the new text.")
Set MyRange = Selection.Sentences(1)
With MyRange
.MoveStart wdWord, 1
.Collapse Direction:=wdCollapseStart
.MoveEnd wdWord, 1
.MoveEnd wdCharacter, -1
.Text = NewText
End With
Set MyRange = Nothing
End Sub