Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Feb 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Table AutoFormat (Word2000)

    Hello,
    Is there a Word add-on that expands the available options under Table AutoFormat...i.e., more preformatted table "styles" that can be applied to new/existing Word tables? Thank you.
    OmaSteak

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table AutoFormat (Word2000)

    Hi Oma:
    I find that the best option is to create a two row table with as many columns as you want. Format it the way you want--table properties & row & column settings--and then save it as an autotext entry. e.g. I use t2, t3, etc. as autotext names for 2 column, 3 column, etc. tables which are formatted the way I want. All I have to do is type e.g. t3 & press F3 & get a 2 row, 3 column table. I get additional rows by pressing the tab key. You could create shadowed borders & name them tb2, tb3, etc. & no borders & name them tn2, tn3, etc.. As long as you have a naming system that triggers your memory, it takes no time to create tables.
    Hope this helps,

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Table AutoFormat (Word2000)

    There are table styles in Word 2002 but not in Word 2000. I don't know of a way to add to the AutoFormat options so I use a macro to reformat existing tables to my own style. Try recording a macro where you reformat an existing table to your own preferences. If you get the selection order just right then it can be reused for many other tables.

    My table formatting macro has evolved to look like this. It will work across multiple selected tables but ignores the inner tables where a nested table is used (an interesting phenomenon). Note this macro also ensures there is a caption above the table. I would expect it to fall over for you until you ensure that the paragraph styles already exist in the document.
    <pre>Sub TableFormat()
    ' Macro created by Chrysalis Design Pty Ltd
    ' Reformats selected tables to a standardised layout
    Dim myRange As Range, aTable As Table
    On Error GoTo ErrCatcher
    'Makes sure the current selection includes a table
    If Selection.Tables.Count > 0 Then
    'at least one table is included in the current selection
    'run procedure on all tables in selection
    For Each aTable In Selection.Tables
    'Go to the paragraph in front of the table
    aTable.Select
    Selection.MoveLeft Count:=2
    Set myRange = ActiveDocument.Range(Selection.Paragraphs(1).Range .Start, _
    Selection.Paragraphs(1).Range.End)
    If myRange.Fields.Count = 0 Then
    aTable.Select
    AddTableCaption ("Table")
    ElseIf myRange.Fields(1).Type <> wdFieldSequence Then
    aTable.Select
    AddTableCaption ("Table")
    End If
    'now make sure it has the right style
    aTable.Select
    Selection.MoveLeft Count:=2
    Selection.Style = ActiveDocument.Styles("Caption Table")
    'Now go back to process the table
    With aTable
    .Rows.HeightRule = wdRowHeightAuto
    .AutoFormat Format:=wdTableFormatGrid1, ApplyBorders:= _
    True, ApplyShading:=True, ApplyFont:=False, ApplyColor:=False, _
    ApplyHeadingRows:=False, ApplyLastRow:=False, ApplyFirstColumn:=False, _
    ApplyLastColumn:=False, AutoFit:=False
    .Select
    Selection.Style = ActiveDocument.Styles("Table Text")
    .Rows(1).Select
    Selection.Style = ActiveDocument.Styles("Table Header")
    .Rows(1).HeadingFormat = True
    .Rows.SpaceBetweenColumns = CentimetersToPoints(0.2)
    .Rows.AllowBreakAcrossPages = False
    .Rows.Alignment = wdAlignRowCenter
    .Rows.SetLeftIndent LeftIndent:=CentimetersToPoints(0), RulerStyle:= _
    wdAdjustNone
    .Columns.AutoFit
    End With
    Next aTable
    Else
    'no tables are included in the current selection
    MsgBox "This macro cannot run unless the current selection includes a table"
    Exit Sub
    End If
    Exit Sub
    ErrCatcher:
    If Err.Number = 5941 Then
    RefreshStylesFromTemplate
    Err.Clear
    Resume Next
    ElseIf Err.Number = 5991 Then
    Resume Next
    Else
    MsgBox "Error Number: " & Err.Number & vbCr & Err.Description, _
    vbCritical, "Error"
    End If
    End Sub</pre>

    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
  •