Share via

Table left border alignment

Anonymous
2024-03-13T14:39:38+00:00

I typically use Word 2010 and I rarely use tables. When I do the table is usually used more for formatting (alignment of content) than for display and I don't have visible borders.

When inserting a table using Word 2010 (and I'm assuming earlier versions), the text in column 1 aligns with left margin of the page (or with other document text). This works perfectly for my purposes.

In Word 2019 (and I assume possibly other versions after Word 2010), when I insert a table, the table left border (visible or not) aligns with the left margin as shown below. I understand and accept that this behavior may have been requested and implemented on purpose, but it does cause a make a train wreck when tables are used for content alignment.

When I have to use Word 2019 and a table for my purposes, I fix the issue with a simple macro:

Sub FixFUBARWord2019TableProperties()
Dim oTbl As Word.Table
Dim dblWidth As Double
Set oTbl = Selection.Tables(1)
dblWidth = oTbl.PreferredWidth
If dblWidth = 0 Then
  dblWidth = ActiveDocument.PageSetup.PageWidth - (ActiveDocument.PageSetup.LeftMargin + ActiveDocument.PageSetup.RightMargin)
End If
oTbl.PreferredWidth = dblWidth + oTbl.RightPadding + oTbl.LeftPadding
oTbl.Rows.LeftIndent = -oTbl.LeftPadding
End Sub

I have looked and looked but perhaps missing it.  Is there a setting anywhere in Word 2019 that would allow you to 
insert tables in Word 2010 (or classic format)?  Thanks.
Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 323K Reputation points MVP Volunteer Moderator
    2024-03-14T00:57:20+00:00

    Via the Table Properties dialog, remove the left margin from the cell.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Suzanne S Barnhill 277.4K Reputation points MVP Volunteer Moderator
    2024-03-14T11:18:43+00:00

    If you could set compatibility to Word 2010, that would do it, but I don't think there's any direct way to do this. If you open a document created in Word 2010, the Compatibility settings are so numerous I can't even capture them all in a screen shot, but one of them is "Use Word 2010 table style rules." That one may not be relevant, as there are others referring to tables and borders, but it is the only option that is checked if you select Word 2010 for "Lay out this document as if created in..." I believe you can set this with VBA (somewhere I recall someone furnishing a macro to change the version setting; it can't be done through the UI.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-03-14T06:20:12+00:00

    Doug,

    Yes that works too. It just seems I read somewhere, sometime ago that there was a compatibility setting or something that would allow retaining the old behavior. Thanks.

    Was this answer helpful?

    0 comments No comments