Dear Aspose Team,
please…Who can help?..
Dim m_strInputDir As String = MyDir + "in.docx"
Dim m_strOutputDir As String = MyDir + "Out.docx"
'1.get .doc temple
Dim doc As New Document(m_strInputDir)
'2.get Paragraph all node
Dim NodeCollection As NodeCollection = doc.GetChildNodes(NodeType.Paragraph, True)
'3.How can i into PlainText to Paragraph ?
For Each Paragraph As Paragraph In NodeCollection
If Paragraph.Range.Text.Trim.ToString = "[@INSERT_PARA_TEXT]" Then
Paragraph.RemoveAllChildren()
Dim sdtPlainText As New StructuredDocumentTag(doc, SdtType.PlainText, MarkupLevel.Inline)
sdtPlainText.RemoveAllChildren()
Dim run As New Run(doc)
run.Text = "NTD_________"
run.Font.Color = Color.Green
sdtPlainText.AppendChild(run)
Paragraph.AppendChild(sdtPlainText)
End If
Next
'Finally.save doc
doc.Save(m_strOutputDir)
tahir.manzoor:
Dear tahir.manzoor,Thank you so much!I did!!!!! :)