locked
Word 2010 - Bug, Line between two tables is not deleted completely RRS feed

  • Question

  • Hello,
    if one created a document in Word < 2010 with two tables, divided by a line of text, one could select the line of text including the line break (invisibles on), press delete and the line of text would have been deleted - the two tables would have been merged.

    This behavior changed in Word 2010. The text is deleted, but the linebreak still stands there - the two tables are not merged. If delete is pressed a second time the line is finally deleted and the two tables are merged.

    If one puts in a second (blank) line and does the same - going to the beginning of the line, selecting everything to the end (in this case the two lines) so that the line breaks are included, again, the line is deleted correctly and the two tables are merged.

    This behavior breaks every macro.

    Does anyone know whether this is a real bug or just a kind of setting in Word 2010?

    Thanks in advance.

    C. Spiewok

    Monday, January 10, 2011 3:00 PM

Answers

  • I think you will find that it is by design to expressly avoid tables being merged when text between tables is deleted. Personally I find that an improvement.

    If there is a setting that controls this behaviour, I haven't spotted it, but I wouldn't rule it out.

    You can work around it with a macro e.g.

    Selection.Paragraphs(1).Range.Delete
    If Application.Version > 12 Then
        Selection.Paragraphs(1).Range.Delete
    End If
    Application.ScreenRefresh

    will remove a single paragraph containing the cursor between tables and merge the tables in Word 2010 or earlier.



    <CSpiewok> wrote in message news:31bb449b-3860-4a0d-8c8f-47e1e4ecf188@communitybridge.codeplex.com...

    Hello,
    if one created a document in Word < 2010 with two tables, divided by a line of text, one could select the line of text including the line break (invisibles on), press delete and the line of text would have been deleted - the two tables would have been merged.

    This behavior changed in Word 2010. The text is deleted, but the linebreak still stands there - the two tables are not merged. If delete is pressed a second time the line is finally deleted and the two tables are merged.

    If one puts in a second (blank) line and does the same - going to the beginning of the line, selecting everything to the end (in this case the two lines) so that the line breaks are included, again, the line is deleted correctly and the two tables are merged.

    This behavior breaks every macro.

    Does anyone know whether this is a real bug or just a kind of setting in Word 2010?

    Thanks in advance.

    C. Spiewok


    Graham Mayor - Word MVP
    www.gmayor.com
    Posted via the Communities Bridge
    http://communitybridge.codeplex.com/
    • Marked as answer by Sally Tang Thursday, January 20, 2011 7:23 AM
    Monday, January 10, 2011 3:36 PM

All replies

  • I think you will find that it is by design to expressly avoid tables being merged when text between tables is deleted. Personally I find that an improvement.

    If there is a setting that controls this behaviour, I haven't spotted it, but I wouldn't rule it out.

    You can work around it with a macro e.g.

    Selection.Paragraphs(1).Range.Delete
    If Application.Version > 12 Then
        Selection.Paragraphs(1).Range.Delete
    End If
    Application.ScreenRefresh

    will remove a single paragraph containing the cursor between tables and merge the tables in Word 2010 or earlier.



    <CSpiewok> wrote in message news:31bb449b-3860-4a0d-8c8f-47e1e4ecf188@communitybridge.codeplex.com...

    Hello,
    if one created a document in Word < 2010 with two tables, divided by a line of text, one could select the line of text including the line break (invisibles on), press delete and the line of text would have been deleted - the two tables would have been merged.

    This behavior changed in Word 2010. The text is deleted, but the linebreak still stands there - the two tables are not merged. If delete is pressed a second time the line is finally deleted and the two tables are merged.

    If one puts in a second (blank) line and does the same - going to the beginning of the line, selecting everything to the end (in this case the two lines) so that the line breaks are included, again, the line is deleted correctly and the two tables are merged.

    This behavior breaks every macro.

    Does anyone know whether this is a real bug or just a kind of setting in Word 2010?

    Thanks in advance.

    C. Spiewok


    Graham Mayor - Word MVP
    www.gmayor.com
    Posted via the Communities Bridge
    http://communitybridge.codeplex.com/
    • Marked as answer by Sally Tang Thursday, January 20, 2011 7:23 AM
    Monday, January 10, 2011 3:36 PM
  • Hi Graham,

    thanks for your quick answer.

    So, the behavior did change, it's not a bug - call it improvement or not: it breaks the macros. It would have been great to communicate this change somehow.

    Personally I think the correct behavior would be (if you select the line break, too) to delete the line but keep the tables separate. Like this there is not "magically" a linebreak coming up.

    Best regards,
    Christian

    Tuesday, January 11, 2011 8:11 AM
  • To be fair, every new Word version holds the potential to render earlier macros unusable as code sequences change all the time. You can always re-code your macros to allow for the difference. The current behaviour is what you describe as correct - the paragraph is deleted, the tables remain separate. It is the paragraph mark that terminates every table that allows it to be separate. Without it the tables would be merged.



    <CSpiewok> wrote in message news:13321098-b1b6-44b7-b0d0-cf27ee1fc5df@communitybridge.codeplex.com...

    Hi Graham,

    thanks for your quick answer.

    So, the behavior did change, it's not a bug - call it improvement or not: it breaks the macros. It would have been great to communicate this change somehow.

    Personally I think the correct behavior would be (if you select the line break, too) to delete the line but keep the tables separate. Like this there is not "magically" a linebreak coming up.

    Best regards,
    Christian


    Graham Mayor - Word MVP
    www.gmayor.com
    Posted via the Communities Bridge
    http://communitybridge.codeplex.com/
    Tuesday, January 11, 2011 3:36 PM