• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 793
  • Last Modified:

Style to change highlight/font whilst maintaining word colouring!

Ah hello.

I am using Word 2007, and I would like to create a style that changes the background of the text to grey, the font to courier, but keeps the colouring of the original words the same.  Please see the image below.  

Required style result
I can figure out how to get the font to change to courier, but I can't see how to get the background to grey without applying it to the whole paragraph (I only want to apply it to the *selection*).  Also, Word does not seem to remember the original colour of the words when I apply the font: they all go to black.

Secondly, can someone tell me how, once this style is setup, to get Word to ignore the spelling of any parts of the document that have this style applied please?

(100 points/question)

TIA
0
mrwad99
Asked:
mrwad99
  • 6
  • 5
2 Solutions
 
Paul SauvéCommented:
Hi Mr. Wade,

eureka -

1 - select the text
2 - select Borders and Shading
choose a colour3 - select Shading tab and choose a colour
Borders and Shading4 - create a new Character style
 Denfine new style5 - Use as required

I did this in Word 2010, but it should work in Word 2007.

PaulS
0
 
Paul SauvéCommented:
Here's the file... Test-Galil-e---Einstein.docx
0
 
mrwad99Author Commented:
Hi paulsauve,

Thanks for that.  I downloaded your document and tried the style: it works fine apart from the fact that if you apply the style to words that have different colours, the original colours is forgotten: they all go black.  See the image below.
 Prob
Is there any way we can maintain the original colouring of the words, just change the font and the highlight?
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
Paul SauvéCommented:
Use ONLY select Shading tab and choose a colour. However, you won't be able to define a style. Alternatively, use the Text Highlight tool.
0
 
mrwad99Author Commented:
Use ONLY select Shading tab and choose a colour

Sorry, I don't understand what you mean.  I am not a very competent Word user at the best of times (I don't have need to be) so can you explain in simple terms please?

TIA
0
 
Paul SauvéCommented:
"Use ONLY select Shading tab and choose a colour" See "2 - select Borders and Shading" as above
OR

Select the text

Select Text highlight color:Select colour
Select colour:Text highlight color tool
Is that ok?
0
 
mrwad99Author Commented:
Oh right, I understand you now.  So basically you are saying take the paragraph shading out of the style and apply it manually.

Not really what I wanted, but I was playing with macros and it seems I can do all of this without having to define a style: I can just record the steps to change the highlight of the selected text, then change the font and font size etc.

Either way, you have helped me, so thanks.  The points are yours :)
0
 
Paul SauvéCommented:
If you create a macro, FIRST, you have to be able to locate the string of text that is NOT the same colour as the rest of the text in the document.



0
 
mrwad99Author Commented:
I don't see what you mean.  The macro body is

    Options.DefaultHighlightColorIndex = wdGray25
    Selection.Range.HighlightColorIndex = wdGray25
    Selection.Font.Name = "Courier New"

which simply gets the highlighted text, then changes the highlight colour and font.  It leaves everything else in the selection the same, which includes the words colouring.
0
 
Paul SauvéCommented:
Yes, but how does the macro find the text to highlight? That was my point of the above comment.
0
 
mrwad99Author Commented:
No, I have to highlight the text first.  But that is what I would be doing with styles anyway: I would highlight the text I wish to apply the style to, then click the style itself.  This does not have the benefit that I could not change the style, then have all pieces of text with that style applied updated automatically, but I am willing to accept this since retaining the original colouring of the words is too important.  Thanks again.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now