Posted by webmaster Guido on August 07, 2003:
In Reply to: Urgent: How do i transfer the delphi code to a word document efficiently. posted by p12297 on August 06, 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, else how can i print the delphi files with page numbers i want to assign in the bottom, and with appropriate margins, lets say 1.5" on the left. Please someone write asap if you know
If you mean "copy all of the text of the project file and the unit-files to a Word doc", here are a few tricks to do it manually:
1. Create a new Word doc and enter this text:
2. In the menu, select "Insert / File"
3. In the "Open" dialog box, navigate to the folder that contains your Delphi project. Next, paste the text "*.dpr; *.pas" from the clipboard in the File Name box.
4. In the dialog box that is still open, you'll see a list of all .dpr and .pas files. Select the first file that you want and click the Insert button.
5. Add some separation below the text, (horizontal line, pagebreak,...)
6. Apply some make-up as desired: set up the margins in Word's Page Setup, select the entire text and apply a non-proportioanl font like Courier New, and so on...
Maybe you have lots and lots of files, and you want to automate this? I'll have a look if I find any quick solutions (there must be some faster ways to assemble all the text file into one larger file, and next import that in Word).
...or maybe I misunderstood your question? In that case, don't hesitate to write again!