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
|
Sub Titre()
On Error Resume Next
Dim val
Dim c
For Each c In Range("A1:A300" )
'Trouve la valeur Titr
Cells.Find(What:="Titr", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
val = Left(ActiveCell, 4)
If val = "Titr" Then
ActiveCell.Select
'Mise en gras du mot Titre
With Selection.Characters(Start:=1, Length:=7).Font
.FontStyle = "Gras"
End With
'Pour l'instant, c'est libellé ainsi, ce qui supprime simplement les derniers caractères, mais c'est là qu'il faudrait
'dire "remplace depuis le carctère 47 par [...]
With Selection.Characters(Start:=47, Length:=2000).Delete
End With
End If
Next
End Sub |
Partager