File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How to get Java code into a Word document Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "How to get Java code into a Word document" Watch "How to get Java code into a Word document" New topic
Author

How to get Java code into a Word document

Thomas Hawk
Greenhorn

Joined: Oct 01, 2004
Posts: 9
I have a number of Java source files that I need to include in a technical document (MS Word format). Is there a tool that will take all the source files for a project and either create a new word document or import them into an existing word document? I would like to preserve the original source code formatting and it would be great if file name headings were automatically added to the word document, though I can live without this latter capability. Thanks for any help you all can provide.


TH
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

I am fairly certain you could write a Word macro to get all the files with a certain extension in a certain directory and format them any way you liked.
Guru dhaasan
Ranch Hand

Joined: Sep 13, 2006
Posts: 126

you can use some extenral utilities like textpad and then try to copy form there to word


Thanks, Shiv
SCJP, OCE - JSP & Servlets Developer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get Java code into a Word document
 
Similar Threads
Print Word Document Programatically in Java
Copy first page of multiple word docs into a single word doc
Stroring Word Documents into MYSQL Database
Stroring Word Documents into MYSQL Database
Java Api for converting Word document to PDF?