View Single Post
  #9   Report Post  
Posted to microsoft.public.word.tables
Rage Rage is offline
external usenet poster
 
Posts: 8
Default Word Macro to Format Tables

In fact - scratch that - I've worked it out.

If anyone cares about this, the working macro is this:

Sub ChangeTableSize()
Dim i As Long
Dim myTable As Table
Dim myrange As Range
For i = 1 To ActiveDocument.Tables.Count
Set myTable = ActiveDocument.Tables(i)
Set myrange = myTable.Range
If (myrange.Information(wdActiveEndPageNumber) 35) And
(myrange.Information(wdActiveEndPageNumber) 296) Then
myTable.AutoFitBehavior wdAutoFitFixed
myTable.Columns(1).Width = CentimetersToPoints(1.78)
myTable.Columns(2).Width = CentimetersToPoints(6.37)
myTable.Columns(3).Width = CentimetersToPoints(6.37)
myTable.Columns(4).Width = CentimetersToPoints(1.78)
End If
Next i
End Sub