• Global change of margins in tables

    Author
    Topic
    #489334

    I have a document with in excess of 100 tables. I would like to do the following: globally change the margins of all of the current tables in the document at one fell swoop, and set the default for all future tables to have the same orientation (center) as well as margins. Any ideas?
    Thanks in advance.
    Jeff

    Viewing 3 reply threads
    Author
    Replies
    • #1393344

      You can do the re-formatting with a macro, but I don’t know of a way of changing the defaults.

      Code:
      Sub TblFormat()
      Dim Tbl As Table
      For Each Tbl In ActiveDocument.Tables
        With Tbl
          .BottomPadding = 10
          .TopPadding = 0.1
          .LeftPadding = CentimetersToPoints(1)
          .RightPadding = InchesToPoints(0.1)
        End With
      Next
      End Sub

      Change the padding values to suit your requirements. The units & conversions are just for demonstration.

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    • #1393349

      Some of the table attributes come from the table style. In the majority of documents the tables all use the same default table style because no-one has ever changed the table style.

      You can edit the default table style to your preferred settings to catch all future tables and this will most likely change your existing tables too.

    • #1393407

      Thanks Paul and Andrew. Andrew, if I am reading your post correctly, this might be what I want to do. How do you change the default table style?

    • #1393545

      To change a table style, put your cursor in the table. The Table Tools > Design tab will appear in the ribbon. In the Table Styles section of this ribbon, one of the table styles will be highlighted. Right click this and choose Modify Table Style.

      Make sure you keep your formatting options applied to the ‘Whole table’
      Go to Format>Table Properties>Table>Alignment to center the table style.
      Go to Format>Table Properties>Table>Options to change the cell margins.

      Right click the same table style on the ribbon and select “Set as Default” to make this table style the default style for new tables.

    Viewing 3 reply threads
    Reply To: Global change of margins in tables

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: