Results 1 to 11 of 11
  1. #1
    S Bernhard
    Guest

    Formatting Multiple Tables (Office 2000 Professional SR-1)

    An employee at my office has created a document including 100+ tables. They are interspersed between paragraphs of text. She needs to change the formatting of all the tables to make them uniform. Is there a way to select all tables (without picking up the adjacent text) to format them at the same time?

    Thanks for any help,
    Sandy

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    See <A target="_blank" HREF=http://msdn.microsoft.com/library/periodic/period00/TableStyles.htm> Table Styles in Word 2000/97</A>. You will need to download the code and may have to tweak it some.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    S Bernhard
    Guest

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    Thanks, Chas, I'll see how this works.

    Sandy

  4. #4
    New Lounger
    Join Date
    Mar 2003
    Location
    Anthem, Arizona, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    <P ID="edit" class=small>Edited by jschodde on 14-Nov-01 17:30.</P>Besides purchasing Word 2002 or hacking someone's VBA code, isn't there a tried-and-true macro of some kind that will format multiple tables in one shot? I don't have time to write code and don't really want to. What I'm hoping to find is somthing that's well-written (not that the one posted on the MS site isn't) and is ready to go out of the box.

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    The code on the MSDN site (by Romke Soldaat) is complex because so much functionality needs to be provided for in a generic application - there are so many different aspects to formatting tables. So I doubt you're going to find anything better out of the box.

    If you have a very specific formatting requirement for the tables, it would be possible to write code that's relatively simple (though would still require customization) - it's simple to cycle through a document's Tables collection to enable you to take some action on each table - only question is how simple or complex is the formatting you need to do to the tables?

    What is the specific formatting you need to do, and do you need to do it to all the document's tables, or just some?

    Gary

  6. #6
    New Lounger
    Join Date
    Mar 2003
    Location
    Anthem, Arizona, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    Gary,
    For now I'm just going to create a bunch of tables as autotext entries with the formatting I desire.

    Thanks for your input - I really appreciate it.

    -Jeff

  7. #7
    Star Lounger
    Join Date
    Aug 2001
    Location
    St. Louis, Missouri, USA
    Posts
    67
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    Gary,

    I'm also very interested in this question, but the code is way over my head--and I'm still using '97. <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

    It would improve my sanity considerably if I could apply formatting that's not provided in any of the Word's preset Autoformats. For instance, I want every table to be in 12 point times new roman, single spaced, flush left, preserving italics, bold, superscript, and subscript, with the heading row bold.

    It wouldn't matter if I did all tables in a doc simultaneously or one at a time, with or without selecting the whole table. Just applying all the formatting at once would make me sooo happy.

    Is there a way? <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

    Lin

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

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    Hi Lin:

    I can't give you the code, but I can tell you that there are two things to do for future tables. First, create table styles (like table header, table firstrow, table next rows, or columns, etc.). Make a table using your styles & whatever other changes you want.

    I made a number of 2 row tables the way I wanted that had 2, 3...up to 7 columns. Then I saved the tables as autotext entries & gave them names t2, t3...t7 respectively. The whenever I want a table formatted "my way", I just type e.g. t4,F3 & I have a 2 row 4 column table.

    Hope this helps.

  9. #9
    Star Lounger
    Join Date
    Aug 2001
    Location
    St. Louis, Missouri, USA
    Posts
    67
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    Phil,

    Thanks--I believe I will do that for my own future tables.

    Unfortunately, I also deal with many, many tables already created in many different ways, and completely outside my control. The idea of automatically formatting--well, actually re-formatting--them is what is really exciting, if it can be done.

    Anyone know a way?

    Lin

  10. #10
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    Hi Lin,

    Following up on Jeff's and Phil's suggestion - autotexts is what I use too for creating new formatted tables and is the way to go for these.

    Reformatting existing tables via code can get tricky, particularly when dealing with tables from an outside source. But the formatting you're describing is pretty simple, and the following macro should work:

    <pre>Public Sub ReformatTables()
    'Gary Frieder November 2001
    Dim aTable As Table
    If ActiveDocument.Tables.Count > 0 Then
    For Each aTable In ActiveDocument.Tables
    With aTable.Range
    .Font.Name = "Times New Roman"
    .Font.Size = 12
    With .ParagraphFormat
    .LineSpacingRule = wdLineSpaceSingle
    .Alignment = wdAlignParagraphJustify
    End With
    End With
    aTable.Rows(1).Range.Font.Bold = True
    Next 'aTable
    End If
    End Sub
    </pre>

    Gary

  11. #11
    Star Lounger
    Join Date
    Aug 2001
    Location
    St. Louis, Missouri, USA
    Posts
    67
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Formatting Multiple Tables (Office 2000 Professional SR-1)

    Gary,

    I need to do some more experimenting, but it looks like it works! This is great!

    Thank you, thank you (or, without spellcheck, thnak you, thnak you).

    <img src=/S/joy.gif border=0 alt=joy width=23 height=23> Lin

Posting Permissions

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