INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

style overriding in MS Word

style overriding in MS Word

(OP)
I created a new file testone.docx in Microsoft Word 2013. I typed =rand(1,5) and pressed enter to generate a random paragraph of five sentences.
Then I clicked Ctrl+A, selected Times New Roman, 12 points. In the paragraph, I selected one sentence and made it Italic. Now the total words in the paragraph are 80 words, out of which 17 words are italic. Then I selected the whole paragraph, clicked the down arrow in Paragraph Group of Home tab, selected First line 0.5", before and after spacing 0 pt, and Line spacing double, and clicked OK.

While the paragraph is still selected, I selected Create a Style and entered Name as MyFirstStyle in Create New Style from Formatting dialog box. Now I have a new style MyFirstStyle available.

Then I typed a new paragraph in Normal style with some words in Regular font and some words in Italic font. The paragraph had total 93 words, out of which 17 words were in Italic. It is shown below:

Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document. To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.

When I selected the whole paragraph and applied MyFirstStyle, the words in Italic remained in Italic. Then I typed another paragraph in Normal Style with some words in Regular font and some words in Italic font. The paragraph had total 102 words, out of which 81 words were in Italic. It is shown below:

To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries. Themes and styles also help keep your document coordinated. When you click Design and choose a new Theme, the pictures, charts, and SmartArt graphics change to match your new theme. When you apply styles, your headings change to match the new theme. Save time in Word with new buttons that show up where you need them.

This time, when I selected the whole paragraph and applied MyFirstStyle, the words in Italic did not retain their formatting and the whole paragraph changed to Regular font. I need to create a MyFirstStyle so that Italic words always retain their Italic formatting, regardless of how much is the percentage of Italic words in the whole paragraph.

RE: style overriding in MS Word

There is a difference between paragraph style and character style.
The "styles" you refer to are paragraph styles, meaning they style entire paragraphs. Individual formatting of individual words or characters is character styling.
This will always be overridden by paragraph style as soon as a new paragraph style is being applied.

Please anyone correct me if I'm wrong, but AFAIK there is absolutely no way to create a paragraph sytle that retains individual character styles.

"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.

RE: style overriding in MS Word

(OP)
Thanks MakeItSo

I think there is something more to it. I read in a web page:
If you apply a style to a paragraph, and less than half the text in the paragraph has direct formatting, then Word retains the direct formatting.
If you apply a style to a paragraph, and more than half the text in the paragraph has direct formatting, then the style overrides the direct formatting.

https://shaunakelly.com/word/styles/stylesoverride...

Still, I am unable to comprehend this rule in my examples. I think the percentage of Italic words in the paragraph are affecting the formatting, that's why I gave two examples.

RE: style overriding in MS Word

If I apply a new style to your first example, all italics get lost.

"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.

RE: style overriding in MS Word

(OP)
Thanks MakeItSo

If you created a custom style MyFirstStyle as in my example, italics would remain in the first example, but not in the second example. Try this:

1. Open a blank Word document
2. Type =rand(1,5) and press Enter. You will get the following paragraph:

Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document. To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar.

3. Make the third sentence Italic so that the paragraph looks as follows:

Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document. To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar.

4. Select All, Times New Roman, 12, Create a Style, enter the name MyFirstStyle, OK

5. Now from the Styles Gallery, select Normal. Type =rand(2,6) and press Enter. You will get two paragraphs as follows:

Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document. To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.


Themes and styles also help keep your document coordinated. When you click Design and choose a new Theme, the pictures, charts, and SmartArt graphics change to match your new theme. When you apply styles, your headings change to match the new theme. Save time in Word with new buttons that show up where you need them. To change the way a picture fits in your document, click it and a button for layout options appears next to it. When you work on a table, click where you want to add a row or a column, and then click the plus sign.


6. In the first paragraph, make the second sentence Italic. In the second paragraph, make everything from second sentence onward Italic. The two paragraphs will now look as follows:

Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document. To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.

Themes and styles also help keep your document coordinated. When you click Design and choose a new Theme, the pictures, charts, and SmartArt graphics change to match your new theme. When you apply styles, your headings change to match the new theme. Save time in Word with new buttons that show up where you need them. To change the way a picture fits in your document, click it and a button for layout options appears next to it. When you work on a table, click where you want to add a row or a column, and then click the plus sign.

7. Now click anywhere in the First Normal style paragraph and select MyFirstStyle. The second sentence will remain Italic.

8. Now click anywhere in the Second Normal style paragraph and select MyFirstStyle. All italics will be gone and the whole paragraph will be in Regular font (and this is what I would like to prevent).

RE: style overriding in MS Word

(OP)
I read another article that explains the general rule related to it:

If more than half the text in the paragraph has been applied bold, italics, underline or other types of direct formatting, this formatting is overridden when you apply a style, otherwise the direct formatting is preserved.
https://www.pcreview.co.uk/threads/retain-italics-...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close