none
[Word 2010] How to remove blank space over Word tables? RRS feed

  • Question

  • Hello, I'm having problems with Word tables in Word 2010. After inserting a table one can drag it to the bottom of the sheet (in Print Layout) or to the right margin of the screen (in Web Layout). When in Print Layout, this dragging and dropping creates a weird empty space at the top of the table — there doesn't seem to be any hidden formatting symbols in it, just empty space. What's worse, it doesn't disappear on selecting the table and copying/pasting it into another Word document: I still have this huge empty space over the table. Is there a way to remove it programmatically or reposition the table to its original place that it occupied before it was moved? I need to export tables to Bitmap images and when users move tables I get a blank image with a table barely visible in its bottom.
    Tuesday, January 24, 2012 2:18 PM

Answers

  • Hello Yelena

    I'm not sure whether you're asking for code in order to do this (as this is a programming forum) or just generally "How to".

    If generally "How to":

    1. Click in the Table. Go to Table/Layout/Properties. In the Table tab, under Text Wrapping, click on "None".

    2. These kinds of questions are better asked on the Answers site, which supports working in the UI:
    http://answers.microsoft.com/en-us/office/forum/word

    If you want the object model code:
      TableObject.Rows.WrapAroundText = false


    Cindy Meister, VSTO/Word MVP
    Tuesday, January 24, 2012 3:18 PM
    Moderator

All replies

  • Hello Yelena

    I'm not sure whether you're asking for code in order to do this (as this is a programming forum) or just generally "How to".

    If generally "How to":

    1. Click in the Table. Go to Table/Layout/Properties. In the Table tab, under Text Wrapping, click on "None".

    2. These kinds of questions are better asked on the Answers site, which supports working in the UI:
    http://answers.microsoft.com/en-us/office/forum/word

    If you want the object model code:
      TableObject.Rows.WrapAroundText = false


    Cindy Meister, VSTO/Word MVP
    Tuesday, January 24, 2012 3:18 PM
    Moderator
  • Well I stated in my initial post that I want to remove blank space programmatically. If it were a purely formatting issue I'd probably thought about some ways to counter it so I definitely wanted an object model here. Thanks for your answer. Though I must say that in Microsoft.Office.Interop.Word model this property is not Boolean but rather Long and its default value seems to be -1. Setting it to 0 does the job though.
    Tuesday, January 24, 2012 5:47 PM
  • Hi Yelena

    Sorry, the word "programmatically" got lost in my brain...

    You didn't specify the programming language you were using, so I gave you the VB version (which is what I get when I do a quick investigation in the native Word Editor). In that language, it's defined as Boolean.

    But yes, if you're using C# most of the boolean values need to be specified as Integers or Long, 0 being False and -1 being True.


    Cindy Meister, VSTO/Word MVP
    Wednesday, January 25, 2012 6:17 AM
    Moderator