InDesign is normally thought of as a full-blown desktop publishing suite, but in its last couple of incarnations -- especially in the upcoming 5.5 release -- it's been positioned more as a platform for generating output to many different destinations.
The program now includes export options for the ePub format. InDesign accepts a broad range of document formats for import and can even map style information from the source document to whatever style definitions you have set up in InDesign. A plug-in from Amazon also lets you export directly from InDesign to the Kindle format.
InDesign has two big downsides. The first is the scope and scale of the program. Because it's a full-blown publishing solution, it requires a lot more work to generate a finished product than a simple conversion utility. Second is the price tag: It starts at $699. That puts it out of reach for users not prepared to invest that much money, although the 30-day trial version should give you an idea of whether it's worth the money or is overkill for your needs.
Calibre, a free and open-source application, is marketed more as a personal e-book management solution than a production suite. That said, it can be used as an e-book conversion utility, and a remarkably powerful one -- provided you understand the full range of options. For that reason, it may well be the best place to start, especially if you're distilling output for multiple e-book formats.
The best thing about Calibre is its support for a broad range of input document types: The program can accept ODF, RTF, ePub, Mobi, PDF and HTML. Calibre can also reformat documents according to various heuristic rules (unwrapping plain text that has too many line breaks, for instance) or insert chapter breaks by looking for certain text structures (such as a line break, the word "Chapter" and then a number).
However, Calibre doesn't support DOC or DOCX documents, so anything coming from Word will have to be saved in another format first. Saving in either ODF or HTML from Word seemed to do the best job of preserving formatting and features, including things like monospaced formatting for code examples. The program also convert books in bulk as well as individually.
OpenOffice.org is itself not an e-book system, of course: It's a free open-source productivity suite. That said, a number of people have authored add-ons for OpenOffice.org for exporting to e-book formats from within the program.
Sign up for CIO Asia eNewsletters.