Solved

Style to change highlight/font whilst maintaining word colouring!

Posted on 2010-11-30
11
780 Views
Last Modified: 2012-05-10
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
Comment
Question by:mrwad99
  • 6
  • 5
11 Comments
 
LVL 31

Accepted Solution

by:
Paul Sauvé earned 200 total points
Comment Utility
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
 
LVL 31

Expert Comment

by:Paul Sauvé
Comment Utility
Here's the file... Test-Galil-e---Einstein.docx
0
 
LVL 19

Author Comment

by:mrwad99
Comment Utility
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
 
LVL 31

Assisted Solution

by:Paul Sauvé
Paul Sauvé earned 200 total points
Comment Utility
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
 
LVL 19

Author Comment

by:mrwad99
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 31

Expert Comment

by:Paul Sauvé
Comment Utility
"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
 
LVL 19

Author Comment

by:mrwad99
Comment Utility
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
 
LVL 31

Expert Comment

by:Paul Sauvé
Comment Utility
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
 
LVL 19

Author Comment

by:mrwad99
Comment Utility
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
 
LVL 31

Expert Comment

by:Paul Sauvé
Comment Utility
Yes, but how does the macro find the text to highlight? That was my point of the above comment.
0
 
LVL 19

Author Comment

by:mrwad99
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Like many others, we try and discourage users from printing documents unnecessarily and instead send or share them electronically. However, this doesn't always work and documents are still printed. With this simple solution, if the user tries to …
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now