Remove setting from style to inherit setting from base style
Solution 1
Turns out there is already an article about this very topic (down to the space-after property being used as an example) available on the word.mvps.org website.
The general idea is you need to use a VBA macro once to clear the formatting. Microsoft Word would benefit from such feature included in the GUI.
Dim oStyle As Style
Set oStyle = ActiveDocument.Styles("Subject")
oStyle.ParagraphFormat.SpaceAfter = oStyle.BaseStyle.ParagraphFormat.SpaceAfter
Solution 2
This is an old question, but still valid, and the answers given so far are not very practical. A simple way to cancel a definition, that deviates from the "Style based on", is to define the property to be the same as in "Style based on". This will remove the definition completely, because it is then useless.
As an example (and a specific answer to the original question), if your style is based on Normal, check what is the Spacing-After value in Normal style. Then change (Styles->[your style]->Modify->Format->Paragraph) the Spacing-After value in your style to be the same as in Normal style. (As default, at least in Word 2019 this value seems to be 8 pt, so you have to write the number 8 instead of clicking down-up, that goes in steps of 6 pt). After that, the style specific Spacing-After definition disappears.
Solution 3
To avoid using VBScript, you can do it by creating a "fully empty style", and then inherit and modify the desired properties:
- Show the Home tab of the ribbon
- Display the styles panel, using the arrow on the bottom right of the styles toolbar
- Select a paragraph of the style you want to modify, and click "Clear All" from the styles panel
- Keep the paragraph selected, and right click on the style name on the panel an choose "modity style to match the selection" (perhaps there's a different wording. I'm using Word in another language )
- Right click and choose modifcy the style, to set the parent style to inherit from, and modify desired properties.
Related videos on Youtube
SealedSun
Computer Science student at the ETH Zurich (Switzerland)
Updated on September 18, 2022Comments
-
SealedSun over 1 year
In my Microsoft Word 2010 document I have two paragraph styles: Normal and Subject. Subject has "Style based on" set to Normal (inherits from Normal). In Normal, I have configured a 12pt gap after each paragraph and Subject inherited this rule just fine.
Then I accidentally added a space-after-paragraph rule to Subject, too. This means that Subject no longer "inherits" its space-after-paragraph setting from Normal, meaning that if I change the setting on Normal, I will have to change it on Subject as well.
I'd like to remove the space-after-paragraph setting from Subject so that it once again inherits that value from Normal. Is this possible? If so, how?
I tried deleting the value (12pt), hitting OK, Enter but the setting just reverts to 12pt (overriding the value set in Normal). Short of re-creating the Subject style from scratch I don't know how to solve this.
Thanks
-
Adam over 11 yearsWould setting space-after to "Auto" in your Subject style work?
-
SealedSun over 11 years@Adam no, setting it to "Auto" did not work (tried it). I believe "Auto" means "use font size/line height as space-after".
-
-
SealedSun over 11 yearsInteresting, will try this when I get home, thanks :)
-
SealedSun over 11 yearsSeems to work, but that's not really a solution that people can use every day. That's naturally not your fault, so I'll accept your answer nonetheless.
-
Adam over 11 yearsThanks. You can add the macro to GUI by adding it to the quick access toolbar. See this link for further details: gregmaxey.mvps.org/word_tip_pages/add_macro_to_qat.html This is the best you will get :)
-
SealedSun over 11 yearsHm… right, and then I just have to write a GUI that takes a style and setting name and… Maybe next year XD
-
dualed about 9 years2.5 yrs later, is this still the best option?
-
Adam about 9 years@dualed, Yes, I would say so.
-
wersimmon over 7 years4 years and an entire new version of Office later, is this still the only option?
-
Adam over 7 years@harbichidian, I would assume so although I don't have a new version of Office to test with, I doubt this bug would have been fixed.
-
Ama over 3 years8 years later and still this feature is missing. They did a "good" job in Excel though, including a [Clear] button when defining cells custom conditional formatting. Hoping the feature will propagate to Word styles..
-
Ama over 3 yearsInteresting one, which then makes me wonder what if you actually want the property to override the base style. That is, at the moment it has the same property, but you want that property to remain as is, even if the base style is then subsequently updated.
-
Sanjay Manohar about 3 yearsOK This is a very interesting solution to the problem. I wonder if the same thing happens if you do the opposite: change a parent's style to match it's child style -- does the child then "lose" its specific definition?
-
ChefAndy over 2 yearsMac Users: I tried removing the specified typeface from a paragraph style in Word for Mac v16— doesn't work, sadly. The settings summary in the style modal indicates it would, but the new parent style's font still doesn't propagate.
-
ChefAndy over 2 yearsScratch that— I dug into the XML and it turns out there was a character style associated with the paragraph style. My experience isn't relevant.