Can I just make sure that I am correct in assuming that you want to add a new section to the body of a document, for example to move from text arranged in a single column to text arranged in two? If this is the case, then I do not believe that is supported by the API. It is possible to get at the sections of a document but not, as far as I am aware, to insert a new section into a document. Please do not accept this as the final word on the issue. It has been a long time since I used the API and Sergei is in a far better position to offer a definitive answer so it might be best to wait for him.
Setting that aside for a moment, there are options. Firstly - and this would be many users preferred option - you could work on implementing this feature in the API. There are people who could offer you support in doing this and Yegor is possibly the best point of contact. Secondly, you could use OLE to control Word itself but this is cumbersome, quite complex and only supported on Windows boxes (I cannot speak of the utility of Wine and whether it could be used to support OLE/COM on a Linux platform). Thirdly and moving back to platform independence, you can use Open/LibreOffice and create what is called a UNO Client Application. It works a little like OLE in that you are controlling an application from Java code and it is just as cumbersome and, possibly, even more complex as you do not have the support of Word's Macro Recorder. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-add-section-in-HWPFDocument-tp5709801p5709808.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
