1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| If NbTableau > 0 Then
For Each Tableau In objWord.Selection.Tables
For Each Ligne In Tableau.Rows
For Each Cellule In Ligne.Cells
TexteCellule = Cellule.Range.Text
LongueurTexteCellule = Len(Cellule.Range.Text)
MsgBox TexteCellule & " / " & LongueurTexteCellule
'
' les deux derniers caractères forcés à noir et non rayé
'
' Right(Cellule.Range.Text, 2).Font.Color = wdColorBlack
''' TexteCellule.Font.Color = wdColorBlack
If LongueurTexteCellule = 2 Then
'' TexteCellule.Select
'' Right(Cellule.Range.Text, 2).Select
'''' Cellule.Select
'''' With Cellule.Range.Text.Characters(Len(Cellule.Range.Text) - 2, 2).Font
With Cellule.Characters(Len(Cellule.Range.Text) - 2, 2).Font
' With Cellule.Range.Font
' With Cellule.Range.Text
' Selection.Characters.Text
'''' Selection.Text.Characters
'''' With Selection.Characters(Len(Cellule.Range.Text) - 2, 2).Font
' Right(Cellule.Range.Text, 2).Select
' With Right(Cellule.Range.Text, 2).Font
' With TexteCellule.Font
' With Selection.Font
.Color = wdColorBlack
.Strikethrough = False
End With
End If
Next Cellule
Next Ligne
Next Tableau
'Next T
End If |
Partager