View Single Post
 
Old 08-22-2016, 05:28 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It's not at all apparent how you expect to have 11pt text in tables with a 6pt row height, but they're your tables:
Code:
Sub FormatTables()
Application.ScreenUpdating = False
Dim oTbl As Table, oCel As Cell
For Each oTbl In ActiveDocument.Tables
  With oTbl.Range
    With .Font
      .Name = "Arial"
      .ColorIndex = wdBlack
      .Size = 11
    End With
    .HighlightColorIndex = wdYellow
    .ParagraphFormat.Alignment = wdAlignParagraphLeft
    .Cells.VerticalAlignment = wdCellAlignVerticalTop
    For Each oCel In .Cells
      If oCel.Height > 6 Then
        oCel.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
      End If
    Next oCel
  End With
Next oTbl
Application.ScreenUpdating = True
End Sub
The above code processes all tables in the document. To process a particular set of tables, change ActiveDocument to Selection, then select the tables to process before running the macro.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote