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. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,816
    Thanks
    0
    Thanked 166 Times in 153 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]

  4. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,465
    Thanks
    3
    Thanked 128 Times in 121 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

  5. #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?

  6. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,465
    Thanks
    3
    Thanked 128 Times in 121 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
  •