View Single Post
  #3   Report Post  
Posted to microsoft.public.word.tables
Tom Tom is offline
external usenet poster
 
Posts: 61
Default suddenly experiencing error messages with table macro

I found a site that provides some instruction on including Or
statements, but modification of the following code doesn't seem to
work:


Sub ConvertRefTables()
Dim oTbl As Table
For Each oTbl In ActiveDocument.Tables
If oTbl.Cell(1, 1).Range.Style = ActiveDocument.Styles("Table
Header") _
Or oTbl.Cell(1, 1).Range.Style =
ActiveDocument.Styles("Caption-figure") _
Then
With oTbl
.Style = ActiveDocument.Styles("Reftable")
.PreferredWidthType = wdPreferredWidthPercent
.PreferredWidth = 75
End With
End If
Next oTbl
End Sub

Can someone point out what I'm doing wrong?