VBA FAQ

Форматирование заголовков таблиц в Word

Форматирование заголовков таблиц в Word
Sub wrd_AllTablesHeadingFormat()
'
' Set all tables first rows heading format to True
'
'
Dim doc As Document
Set doc = ActiveDocument

Dim intCount As Integer
intCount = doc.Tables.Count

Dim curTable As Table
 
Dim iTable As Integer
For iTable = 1 To intCount
    Set curTable = doc.Tables(iTable)
    curTable.Select
    Selection.Tables(1).Rows(1).HeadingFormat = True
Next iTable

End Sub

Тэги: