wood burning stoves 2.0*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
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: 18716
    
    8

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to get Java code into a Word document