I have merge fields in a table inside word document template and I am trying to populate the rows only when the data is present. I am able to clean up the merge field references in the template after my document has fini…...Document doc = new Document("path/to/your/template.docx"); //...the output document doc.save("path/to/your/output.docx"); } } In...