Copy/Paste source code from Eclipse to Microsoft Word

Today I wanted to copy and paste a piece of code from Eclipse Indigo to Microsoft Word 2007 and keep the syntax highlighting. In some cases it worked but in some other not.
After searching in the webI found that if the area you want to copy has folded code in it, the syntax highlight will not be preserved (picture 1)

code fold in Eclipse

Picture 1. Code fold in Eclipse

So before you start copying and pasting from Eclipse to Microsoft Word unfold any part of the code you want to copy (picture 2)

unfold Code in Eclipse

Picture 2. unfold code in Eclipse

Advertisements

About cmanios

programming
This entry was posted in Uncategorized and tagged , , , , , , , . Bookmark the permalink.

3 Responses to Copy/Paste source code from Eclipse to Microsoft Word

  1. Thank you so much! This solved my problem.

  2. rvi says:

    thanks a lot!

  3. Christopher says:

    Very helpful thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s