Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting styles based on Normal and List styles stameni Word 5 09-17-2021 12:07 PM
Creating buttons for individual paragraph styles on a ribbon tab - not using Quick Styles T7Training Word 11 12-22-2019 12:16 PM
Does a new set of styles in a template overwrite or remove the existing set of styles in a document? dianahbr Word 6 03-27-2018 11:12 PM
Two much blank space between names of styles in the Styles Pane PereCasanellas Word 0 10-06-2017 03:47 AM
Question about spacing between multi-level bullet styles (and other styles) SDwriter Word 0 09-26-2017 09:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft