View Single Post
  #2   Report Post  
Margaret Aldis
 
Posts: n/a
Default

Replies in line:
"Hutystng29" wrote in message
...
Hello,
I am using Office XP and have tried to apply formatting to the first

(left)
column of many tables in my document using a table style by creating a new
table style, then setting the formatting to "Apply Formatting to: Left
Column", with bold, left alignment, arial, size 10 font. However, when I
apply this table style to my tables, the left column comes out bold, but

the
font size is 11pt and the alignment is justified, even after I "clear
formatiing" and then re-apply the table style. Does anyone know if this is

a
bug or if there is a workaround?


The table style font settings are seriously flawed - they only work on text
characteristics that exactly match the default (i.e. as shipped) Normal
style - 12pt Times Roman, left justified etc. Any initial variations are
left untouched.

So yes, it's a bug, though apparently in the design. One way of working with
it is to set up a 'Cell' style that exactly matches the delivered defaults -
if you apply that to cells in the table it will allow all the actual
formatting to come from the table style and position within table.
Alternatively you can set up separate Cell styles for the different
formatting you need and apply them manually or by running your own table
formatting macros.

Additionally, I would like to apply a global setting (macro) in my

document
to fix the widths of my tables to certain values. Is there a way i can do
this to the whole document without manually changing the widths of each
table? I have many 2-column tables in my document.
Thanks,


You can apply the formatting code to each table in the document something
like this:

Dim oTable As Table
For Each oTable In ActiveDocument.Tables
With oTable
.PreferredWidthType = wdPreferredWidthPoints
.PreferredWidth = InchesToPoints(5) ' set your width here
' add any other formatting you need to do here
End With
Next oTable

(You could amend this to apply to the current selection rather than the
whole document, or to test the table style, if you only need to fix some
tables.)

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk
Word MVP FAQ site: http://www.word.mvps.org