View Single Post
 
Old 08-23-2017, 09:32 AM
sentinel166 sentinel166 is offline Windows 10 Office 2013
Novice
 
Join Date: Aug 2017
Posts: 4
sentinel166 is on a distinguished road
Unhappy [W10, office 2013] couleurs s'inscrivent pas dans les macros quand je les enregistre

Soit une ligne contenant, sans formattage aucun, ""
Je met en route l'enregistreur de macro, pour obtenir ça: f a c ffa
le 2e f se voit appliqué la modification "Gradient Fill, Gold, Accent 4, Outline - Accent 4", le troisième f est barré, et le dernier a est en indice.
Ni l'application de couleurs, ni celle d'effets de texte/typographie un peu flashy ne sont pris en compte par l'enregistreur de macro.

Code:
Sub Macro5()
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Font.Bold = wdToggle
   Selection.MoveRight Unit:=wdCharacter, Count:=2
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   If Selection.Font.Underline = wdUnderlineNone Then
       Selection.Font.Underline = wdUnderlineSingle
   Else
     Selection.Font.Underline = wdUnderlineNone
   End If
   Selection.MoveRight Unit:=wdCharacter, Count:=2
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.MoveRight Unit:=wdCharacter, Count:=2
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.MoveRight Unit:=wdCharacter, Count:=1
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Font.StrikeThrough = wdToggle
   Selection.MoveRight Unit:=wdCharacter, Count:=1
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Font.Subscript = wdToggle
   Selection.MoveLeft Unit:=wdWord, Count:=4
End Sub
Reply With Quote