?
Solved

Style to change highlight/font whilst maintaining word colouring!

Posted on 2010-11-30
11
Medium Priority
?
790 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 33

Accepted Solution

by:
Paul Sauvé earned 800 total points
ID: 34242534
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 33

Expert Comment

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

Author Comment

by:mrwad99
ID: 34246728
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
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

 
LVL 33

Assisted Solution

by:Paul Sauvé
Paul Sauvé earned 800 total points
ID: 34251854
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
ID: 34255988
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
 
LVL 33

Expert Comment

by:Paul Sauvé
ID: 34258751
"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
ID: 34259203
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 33

Expert Comment

by:Paul Sauvé
ID: 34259311
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
ID: 34259349
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 33

Expert Comment

by:Paul Sauvé
ID: 34263131
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
ID: 34265565
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
Suggested Courses

800 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