Hi,
I want to read text value from StructuredDocumentTag control, such as TextField, the return value always end with aa special character, question mark with square border, how can i trim it away and get the pure text value? thanks.
@liao1108 You can use code like this to get pure text from SDT:
Document doc = new Document(@"C:\Temp\in.docx");
StructuredDocumentTag sdt = (StructuredDocumentTag)doc.GetChild(NodeType.StructuredDocumentTag, 0, true);
string sdtContent = sdt.ToString(SaveFormat.Text).Trim();
Thanks Alexey, it works great.
1 Like