Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you print your programs to MS Word?

We have a project, and the professor asked us to print the program codes using microsoft word. however when i pasted all my codes in ms word it turns out that it doesn't have coloring, those nice programming fonts.. It just looks awfully ugly in microsoft word..

I want this to be printed on papers very gorgeously. Like what we see in our notepad++

like image 931
rymn Avatar asked Jan 24 '23 18:01

rymn


2 Answers

If you are on Windows, you can open the source code in Visual Studio (assuming it is C++, C# or VB), copy the code, and paste it to Word.

"Visual Studio" to "Word" does keep the formatting (color and fonts).

like image 127
decasteljau Avatar answered May 26 '23 19:05

decasteljau


I do not use Word for this when I can avoid it. It's simply not very good at keeping the formatting and doesn't provide really good-looking prints.

  • The line-breaking isn't program-aware.
  • The paragraph breaking isn't program aware.
  • The keeping of the formatting from VS doesn't do structure-based markup, does it?
  • The typesetting engine of Word is a lot worse than TeX or Quark/Indesign
like image 45
Stephan Eggermont Avatar answered May 26 '23 19:05

Stephan Eggermont