Hi Aspose team,
by using this simple code:
Dim oldText As String
Dim newText As String
Dim newText As String
dim
officeDocument = New Document(path)
Dim comments As NodeCollection = officeDocument.GetChildNodes(NodeType.Comment, True)
For Each comm As Comment In comments
oldText = comm.ToString(SaveFormat.Text)
newText = oldText.Replace("comment", "aspose")
If oldText <> newText Then
comm.SetText(newText)
End If
Next
comm.SetText(newText)
End If
Next
I am replacing text in document comments.
If comment text with hyperlink is updated then hyperlink is lost.
If comment text with hyperlink is updated then hyperlink is lost.
Please see attached document and try to replace "comment" to anything to see what I mean.
Any way to preserve hyperlink when comment text is changed?
Thanks,
Oliver
Oliver