Hi,
i’ve noticed this behaviour. I’ve a SDT with some text inside. After empty all the SDT runs i’ve expected that the sdt show the placeholder text but it doesn’t.
Any idea why?
here is my code.
Document doc = new Document("C:\\TestPlaceHoldertDocument.docx");
StructuredDocumentTag sdt = (StructuredDocumentTag)doc.getChild(NodeType.STRUCTURED_DOCUMENT_TAG, 0, true);
NodeCollection runs = sdt.getChildNodes(NodeType.RUN, true);
for (Run run: runs)
{
run.setText("");
}
sdt.isShowingPlaceholderText(true);
doc.save("C:\\outputPlaceHolder.docx");