Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
I tweaked your code a little and it fixed it. I changed Paragraphs(1)
to Characters(1) in this macro and my other table macros and it no longer gives me an error msg when I run them. Here's the slightly tweaked code: Sub ConvertRefTables() Dim oTbl As Table For Each oTbl In ActiveDocument.Tables If oTbl.Cell(1, 1).Range.Characters(1).Style = _ ActiveDocument.Styles("Table Header") Then With oTbl .Range.Characters(1).Style = ActiveDocument.Styles("Reftable") .PreferredWidthType = wdPreferredWidthPercent .PreferredWidth = 75 End With End If Next oTbl End Sub The first characters in my table always have the correct style. If the table ever has any other style applied to it, that style comes in later. Thanks again for your help Macropod. |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
error messages when using table formula after moving column tot's | Tables | |||
Losing textbox on table | Tables | |||
Change Table Background Macro | Tables | |||
Select specific cells in table via macro | Microsoft Word Help | |||
Word 2003 Table AutoFormat vs Macro vs VBA | Tables |