H Martin
This is what I wrote. Ive tried a couple of templates , and each time around 20pages get added to the end which are full of rubbish.
POIFSFileSystem fs;
try {
fs = new POIFSFileSystem(new FileInputStream("C:\\Test\\Template1.dot"));
HWPFDocument
doc = new HWPFDocument(fs);
doc.write(new FileOutputStream("C:\\Test\\Documents\\Document1.doc"));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Forgot to mention, all i want to do is generate some docs based on some templates(.dot) and replace a few keywords. I do have some logos in those templates, but Im assuming they would be 'carried' over.
Thanks