Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,412
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Global change of margins in tables

    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

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,892
    Thanks
    0
    Thanked 188 Times in 172 Posts
    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
    [MS MVP - Word]

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,514
    Thanks
    3
    Thanked 143 Times in 136 Posts
    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.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,412
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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?

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,514
    Thanks
    3
    Thanked 143 Times in 136 Posts
    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.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •