Win a copy of Functional Reactive Programming this week in the Other Languages forum!
    Bookmark Topic Watch Topic
 
friki data migration
Ranch Hand
Posts: 772
  • Mark post as helpful
  • send pies
  • Report post to moderator
This program shows how to use Apache POI HWPF to create a Word document. It sets various font and paragraph properties (like bold, italic, center alignment and first line indent), and adds a custom document property. For more options, check out the JavaDoc:org.apache.poi.hwpf.usermodel.Paragraph and JavaDoc:org.apache.poi.hwpf.usermodel.CharacterRun classes. For some reason, HWPF can't create a document from scratch, so an empty document ('empty.doc') needs to be present when the code is run.



CategoryCodeSamples CodeBarn
 
    Bookmark Topic Watch Topic
  • New Topic