Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to include some Java code in a Word document. It looks bad when it takes 1-2 pages. I'd like to put it in some kind of text area with a scrollbar. Does MS Word have such a feature?

PS This document won't be printed

share|improve this question
up vote 2 down vote accepted

Create file htmlarea.html:

 <textarea cols="80" rows="12" wrap="virtual"></textarea>

Open file in Internet Explorer. Press Ctrl+A, Ctrl+C. (copy htmltextarea)

Open file in Internet Explorer Press Ctrl+V in Microsoft Word. (paste htmltextarea)

htmltextarea in Microsoft Word 2007

Resize htmltextarea in Design mode.

Waring! Design mode may clear htmltextarea text in unsave document!

Resize htmltextarea

Close Design mode. Insert text. Not table or image, text only. The text is not color. Insert text

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.