I am editing a Word document. I want to insert a big block of XML in a cell of a table.

I want to insert a scrollable text block. How can I do that ?

This quest looks simple, but I have not found any way to achieve that.

I have Office Pro Plus 2010.

  • 4
    It may not be simple because Word is meant to develop documents that eventually get printed on paper, and a scrollbox isn't very useful in that medium. It's probably possible, though. Could there be a solution better suited to your problem instead of Word? – Steve Aug 4 '14 at 14:57
  • @Charlie - Your link deals with running code : editing a Word doc in an app that I would develop. I am not in that situation. I edit my Word doc... in Word, in WYSIWYG. – Nicolas Barbulesco Aug 4 '14 at 15:32
  • 2
    Since you did not mention it, that would be a good detail to add to the question. Please edit your question to include all the details about what you are doing. Don't make us guess. Considering you are trying make Word do something it was not designed to do, you may have to deal with a little more than WYSIWYG. – CharlieRB Aug 4 '14 at 19:01
  • @Charlie - I posted my question on Super User, not on Stack Overflow. The normal and common usage of Word documents is... editing them in Word. Not developing one's own application to edit them. To make this even clearer, I am going to slightly edit my question. – Nicolas Barbulesco Aug 6 '14 at 12:06

You can use an ActiveX Textbox to add a dynamically editable and scrollable text box to your document:

  1. On the Word Ribbon, under tab Developer, click icon Legacy Tools (or press ALT+ L, N). A drop-down menu appears.

  2. From drop-down menu, under section ActiveX Controls, click the Text Box (ActiveX Control) icon (or press ALT+L, N, T). Word creates a text box field at the cursor position. By default, the text box is opened in the design mode. You can expand the control to the desired size.

  3. To change the properties of the text box, select the text box and then click Properties (ALT+L, L). The Properties sheet appears. You will want to change the EnterKeyBehavior, MultiLine and ScrollBars properties.

  4. Exit design mode by clicking on the button under the Developer tab and you should now have an editable and scrollable multi-line text box in your document.

  • I had found an approach along these lines, but I discarded it. – Nicolas Barbulesco Aug 6 '14 at 11:42
  • Primo, I don't like the idea of having ActiveX — it sounds like a disease. Secundo, I did not have a tab Developer in my ribbon. I customized the ribbon, to add it. Tertio, at your step 2., I get this insult message : This object cannot be inserted due to your policy settings. I was right do distrust ActiveX. Thank you anyway. – Nicolas Barbulesco Aug 6 '14 at 11:57
  • 4
    ActiveX is never the best solution I agree, but it is practically the only real solution to your flawed question. You shouldn't be asking to do this in Word to start with, it is not something Word is made to do for so many reasons. Hopefully this answer will still be of use for someone more open minded. – Adam Aug 6 '14 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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