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 74,0% France
Canada 6,0% Canada
Belgique 3,8% Belgique

Total:

146

Pays
018404035
Aujourd'hui: 72
Hier: 435
Cette semaine: 2.609
Semaine dernière: 2.700
Ce mois: 10.236