Faster way to transfer multiple source code files to a word doc


[ Delphi Forum ] [ Delphi Tutorials -- by DelphiLand ]

Posted by webmaster Guido on August 07, 2003

In Reply to: Re: Urgent: How do i transfer the delphi code to a word document efficiently. posted by webmaster Guido on August 07, 2003:

: I need to transfer all my delphi codes to a word document for my report, but i am facing difficulty doing that. what is the easiest way?

-----------

Here's a slightly faster way for combining all of your code files into a document, using Word's Clipboard toolbar. This is more efficient when you really have lots of files.

1. Create a new Word doc, say "Project.doc"

2. In the menu, select "File / Open"

3. In the "Open" dialog box, navigate to the folder that contains your Delphi project. Next, type this text in the File Name box:
*.dpr; *.pas
Next, press ENTER (don't click the Open button yet!)

4. In the dialog box that is still open, you'll see a list of all .dpr and .pas files. Select up to 12 of the desired files, next click the Open button.

5. Select "Window / Arrange all" to make all the document windows visible.

6. Activate the Clipboard toolbar (View / Toolbars / Clipboard) and empty the 12 clipboards with speedbutton "Clear clipboard".

7. Switch to the first document (probably you'll want the .dpr as the first one). Select the entire text (Ctrl+A), next copy it to the clipboard (Ctrl+C). An icon representing this becomes visible in the Clipboard toolbar.
Switch to the second document (for example, Main.pas), select the text and copy to the clipboard. A second icon in the clipboard indicates that it is now available.
Repeat for a maximum of 12 documents.

8. Switch to Project.doc and paste all the 12 clipboards at once with the speedbutton "Paste all". Voila!

If you have more than 12 source files in the project, just clear the clipboard, close the 12 windows with the source files, and repeat the entire procedure to add your next bunch of source files.

9. Finally, some make-up as desired (page breaks, headers, footers,...)

 


Related Articles and Replies:


 

[ Delphi Forum ] [ Delphi Tutorials -- by DelphiLand ]