Recherche

Public Sub Tableau()
On Error Resume Next
Dim oTable As Table
Dim oRow As Row
For Each oTable In ActiveDocument.Tables
For Each oRow In oTable.Rows
If LigneVide(oRow) Then
oTable.Rows(oRow.Index + 1).Cells(1).Range.Style = "Titre 2"
End If
Next oRow
Next oTable
End Sub



Public Function LigneVide(Rang As Row) As Boolean
' Teste si une ligne d’un tableau est vide
Dim oCell As Cell
LigneVide = True
For Each oCell In Rang.Cells
If Len(oCell.Range.Text) <> 2 Then
LigneVide = False
Exit For
End If
Next oCell
End Function

 

nb : une cellule vide de tableau est en réalité composée d'un retour paragraphe Chr(13) et d'une sorte d'espace Chr(7), donc de deux caractères.

Statistiques

France 75,5% France
Canada 8,3% Canada
États-Unis d'Amérique 4,9% États-Unis d'Amérique

Total:

61

Pays
018272468
Aujourd'hui: 49
Hier: 188
Cette semaine: 730
Semaine dernière: 804
Ce mois: 730