Hi,
I am trying to set the date in the date picker of header/footer of a word document.
I have used the following code to set the date in the specified format, but the value of the date is not getting updated in the generated document.
NodeCollection sdtNodes = document.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG, true);
I am trying to set the date in the date picker of header/footer of a word document.
I have used the following code to set the date in the specified format, but the value of the date is not getting updated in the generated document.
NodeCollection sdtNodes = document.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG, true);
for (StructuredDocumentTag sdt : sdtNodes)
{
if (sdt.getSdtType() == SdtType.DATE)
{
sdt.setFullDate(new Date());
sdt.setDateDisplayFormat("MM/DD/YYYY");
sdt.setDateStorageFormat(SdtDateStorageFormat.DATE);
sdt.isShowingPlaceholderText(false);
}
}
Kindly give a solution as soon as possible. Thank you in advance.
Regards,
Nikhil Mishra.