View Single Post
 
Old 06-07-2022, 04:41 AM
jpl jpl is offline Windows 7 64bit Office 2010 32bit
Advanced Beginner
 
Join Date: Jan 2016
Location: France
Posts: 33
jpl is on a distinguished road
Default Une propriété des styles

Bonjour
Ma question concerne une propriété des styles.
Je crée un style de paragraphe, nommé Style1.
Je tape quelques lettres avec ce style, je les sélectionne puis en utilisant la boîte de dialogue "Bordure et Trame ..", "Trame de fond" de l'onglet Paragraphe, je colorie le fond en rouge, en appliquant ceci à "Texte".
Puis j'ouvre la fenetre Styles (Alt + Ctrl+Maj+S), je sélectionne le Style1 et je clique sur "Mettre à jour Style1 pour correspondre à la sélection".
Désormais, quand je tape du texte en Style1, il apparait sur fond rouge.
Mon problème, c'est que je ne suis pas fichu de trouver quelle est la propriété correspondante du style, dans la fenêre "Modifier ...", histoire d'aller plus vite ....
En vba, ce qui suit fonctionne dans le module ThisDocument

Code:
Me.Styles("Style1" ).Font.Shading.BackgroundPatternColor = RGB(255, 0, 0)
mais on doit pouvoir le faire directement et simplement, je ne vois pas comment !


Traduction automatique
My question is about a property of styles. I create a paragraph style, named Style1. I type a few letters with this style, select them then using the "Border and Shading.." dialog box, "Shading" from the Paragraph tab, color the background red, applying this to "Text ". Then I open the Styles window (Alt+Ctrl+Shift+S), select Style1 and click "Update Style1 to match selection". Now, when I type text in Style1, it appears on a red background.

My problem is that I can't find what the corresponding property of the style is, in the "Edit..." window, just to go faster....

In vba the following works in the ThisDocument module

Code:
Me.Styles("Style1").Font.Shading.BackgroundPatternColor = RGB(255, 0, 0)
but we must be able to do it directly and simply, I don't see how!
Reply With Quote