Styles; What properties are inherited when "Style based on" is specified?

E

Eric G

Hello,

I've searched the net and the MS knowledgebase, but can not find any detailed specification over exactly what properties are inherited when "Style based on" is used in setting up a style.

Any ideas, or links to some write-up(s)?

Best regards,


Eric G,
Stockholm, Sweden
 
S

Stefan Blom

Every setting which hasn't been explicitly modified in the newly
created style will be inherited from the parent. See
http://www.shaunakelly.com/word/styles/HowStylesCascade.html.

--
Hälsningar
Stefan Blom
Microsoft Word MVP


"Eric G" <[email protected]> skrev i meddelandet
Hello,

I've searched the net and the MS knowledgebase, but can not find any
detailed specification over exactly what properties are inherited when
"Style based on" is used in setting up a style.

Any ideas, or links to some write-up(s)?

Best regards,


Eric G,
Stockholm, Sweden
 
E

Eric G

Hi again Stefan,

Many thanks for your reply and link to Shauna Kelly's article, much
appreciated.

After reading the article a couple of times and starting out with a virgin
template, I now see what's happening.

Best regards,

Eric G,
Stockholm, Sweden

Than
 
S

Suzanne S. Barnhill

What annoys me is that the same relationship doesn't apply to existing
styles. In a brand-new document in which I have no text and have applied no
styles, if I modify Body Text to have 24-point line spacing and no Space
After, then I still have to apply the same modifications to Body Text First
Indent, which is based on Body Text. It seems to me that modifying Body Text
should affect every style based on it except for the aspects in which they
differed to begin with.

Ironically, I have just figured out that if I first change the indent in
Body Text First Indent, THEN modify Body Text, then the modifications in
Body Text are applied to Body Text First Indent. That at least is valuable
knowledge.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
S

Stefan Blom

in message
What annoys me is that the same relationship doesn't apply to existing
styles. In a brand-new document in which I have no text and have applied no
styles, if I modify Body Text to have 24-point line spacing and no Space
After, then I still have to apply the same modifications to Body Text First
Indent, which is based on Body Text. It seems to me that modifying Body Text
should affect every style based on it except for the aspects in which they
differed to begin with.

I hadn't noticed this before. It is indeed annoying! The problem seems
to be only with built-in styles, though.
Ironically, I have just figured out that if I first change the indent in
Body Text First Indent, THEN modify Body Text, then the modifications in
Body Text are applied to Body Text First Indent. That at least is valuable
knowledge.

Yes, this is useful information.

Another method to deal with this type of problems is of course to use
a macro to restore the link between the Body Text First Indent style
and its base style:

ActiveDocument.Styles(wdStyleBodyTextFirstIndent).Font = _
ActiveDocument.Styles(wdStyleBodyTextFirstIndent).BaseStyle.Font

ActiveDocument.Styles(wdStyleBodyTextFirstIndent).ParagraphFormat = _
ActiveDocument.Styles(wdStyleBodyTextFirstIndent).BaseStyle _
..ParagraphFormat

and then specify the desired indent in Body Text First Indent. See
http://word.mvps.org/faqs/macrosvba/ResetStyles.htm for more.
 
S

Suzanne S. Barnhill

Well, you know how much I love macros. <g>

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
S

Stefan Blom

Running the macro in my previous response may lead to unexpected
results if the Body Text First Indent style has no base style. In
other words, it needs to be modified, for example like this:

Sub Test()

Dim s As Style
Set s = ActiveDocument.Styles(wdStyleBodyTextFirstIndent)

If s.BaseStyle = "" Then
Exit Sub
End If

s.Font = s.BaseStyle.Font

s.ParagraphFormat = s.BaseStyle.ParagraphFormat

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top