Search Aspose.Words.Document

Is it any way to search Aspose.Words.Document for a string? Let’s say I need to do similar coding in Aspose.Words as in MS Word, is it possible? Thanks very much.

With objWord.ActiveDocument.Content.Find
.ClearFormatting()
.Text = "Can't open file"
.Forward = True
.Execute()
If .Found = True Then
convertHazard = ""
objWord.Documents.Close (SaveChanges:=Microsoft.Office.Interop.Word.WdSaveOptions.wdDoNotSaveChanges)
result = removeWord()
Exit Function
End If
End With

Hi
Thanks for your inquiry. You can use Replace method to achieve this. Please see the following link for more information.
https://docs.aspose.com/words/net/find-and-replace/
I hope this could help you.
Best regards.