You'll probably need to set pElement.Geometry back to the modified point collection and then set pAnnoFeat.Annotation to the updated pElement.
If TypeOf pElement.Geometry Is IPolyline Then
Dim pPointCol As IPointCollection
Set pPointCol = pElement.Geometry
' Just keep start- and endpoint
pPointCol.RemovePoints 1, pPointCol.PointCount - 2
''----------------------------
pElement.Geometry = pPointCol
pAnnoFeat.Annotation = pElement
''----------------------------
pFeatureCursor.UpdateFeature pfeature
End If
There must be missing something. The geometry doesn't change.
'Replace textPath here ......
' Just keep start- and endpoint
Dim pNewPolyline As IPolyline
Set pNewPolyline = New Polyline
pNewPolyline.fromPoint = pPointCol.Point(0)
pNewPolyline.toPoint = pPointCol.Point(pPointCol.PointCount - 1)
Dim pNewTextPath As ITextPath
Set pNewTextPath = New SimpleTextPath
Set pNewTextPath.Geometry = pNewPolyline
Set pTextSym.TextPath = pNewTextPath
pFeatureCursor.UpdateFeature pFeature