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 72,6% France
Canada 7,2% Canada
Belgique 4,0% Belgique

Total:

122

Pays
018327775
Aujourd'hui: 354
Hier: 171
Cette semaine: 354
Semaine dernière: 2.756
Ce mois: 3.493