How to change style of all tables in a document at once?

D

Doctor Document

I'm copying tables from many documents and sources outside word and pasting
them into a single word document. When I want to apply a uniform formatting
throughout my new document I find myself manually selecting each table using
the 'Goto' button and applying the table styles to each table.

There are over 300 tables in this document. What's the easier way out? I
have to make twelve other documents similar to this one. Is there a way to
define a pasting formatting for tables? Anyone please help.
 
S

Stefan Blom

You could use a macro such as the following:

Sub ApplyTableStyle()
Dim t As Table
For Each t In ActiveDocument.Tables
t.Style = "Light Shading - Accent 3" 'Specify table style name here
Next t
End Sub
 
L

L. Gautero

Dear Stefan,

Thanks for the suggestion, unfortunately in my case, it is not performing
well, in fact the table keep other styles, especially when the contents of
the table (objects as MS Equation) have a style on their own.

basically the whole table is presented having the style of its content.
Is there a way to make this more ordered?
(i.e. a table has its style, independetly from the style of the content of
the cells)

regards
 
S

Stefan Blom

Well, you could use a macro to format the contents of cells as well.

Of course, since there are many factors to consider, this might be tricky or
at least time-consuming. In particular, I don't know how to modify equations
using VBA (if it's even possible).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top