If I open a document template: XWPFDocument document = new XWPFDocument(POIXMLDocument.openPackage("Normal.dotm"));
Add some text: XWPFParagraph paragraph = document.createParagraph(); XWPFRun run = paragraph.createRun(); run.setText("At tutorialspoint.com, we strive hard to " + "provide quality tutorials for self-learning " + "purpose in the domains of Academics, Information " + "Technology, Management and Computer Programming Languages."); Then write to a different file: FileOutputStream out = new FileOutputStream(new File( "createdocument.docx")); document.write(out); out.close(); document.close(); System.out.println("createdocument.docx written successully"); The new file is created, but the template is updated as well!! Any ideas of where to look? --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org