>This choice on the Format button is not available and is grayed out:
>...select Border to open the Borders & Shading dialog.
>
>Also I do have to do this for 25 docs so maybe a macro would be better.
>
>Thanks.
I don't understand how the Borders choice would not be available in
the New Style > Format menu, but the macro makes that a moot point.
Use the following macro, with the instructions at
http://www.gmayor.com/installing_macro.htm. Be sure to edit the lines
that create the style name and color, indicated by the comment.
Sub HighlightToShade()
Dim myRg As Range
Dim StyleExists As Boolean
Dim TestStyle As Style
Dim StyleName As String
Dim StyleColor As Long
' CHANGE THESE VALUES TO SUIT YOUR NEEDS:
StyleName = "ShadeLtGreen"
StyleColor = RGB(227, 255, 171)
With ActiveDocument
' find out whether this style already exists
For Each TestStyle In .Styles
If LCase(TestStyle.NameLocal) = LCase(StyleName) Then
StyleExists = True
Exit For
End If
Next
If Not StyleExists Then
.Styles.Add Name:=StyleName, Type:=wdStyleTypeCharacter
.Styles(StyleName).Font.Shading.BackgroundPatternColor = _
StyleColor
End If
Set myRg = .Range
With myRg.Find
.ClearFormatting
.Highlight = True
.Replacement.ClearFormatting
.Replacement.Style = ActiveDocument.Styles(StyleName)
.Replacement.Highlight = False
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.Execute Replace:=wdReplaceAll
End With
End With
End Sub
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
adgorn - 08 Oct 2006 20:19 GMT
Works great! I even figured out how to find other rgb values from the color
palette on my own, so I can play around a bit.
The macro also changes the font to Arial 9pt and seems to reverse whatever
bolding was there. Actually that may be beneficial. But what controls the
font choice? I may not want this change or I may want to go to another font.
Thanks for taking your time to help me.

Signature
Alan
> >This choice on the Format button is not available and is grayed out:
> >...select Border to open the Borders & Shading dialog.
[quoted text clipped - 59 lines]
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
adgorn - 08 Oct 2006 20:21 GMT
Works great! I even figured out how to change the rgb from the color palette
so I can play around a bit.
One issue: The macro also changed the font to arial 9pt and reversed the
bolding in effect. Actually that may be OK, but what controls the font
choice? I may need to go back to what it was originally or choose some other
font.
Thanks for taking your time to help me.

Signature
Alan
> >This choice on the Format button is not available and is grayed out:
> >...select Border to open the Borders & Shading dialog.
[quoted text clipped - 59 lines]
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
Jay Freedman - 08 Oct 2006 21:16 GMT
A character style that doesn't specify any other font is defined to
use "Default Paragraph Font", as this one does. A side effect of
applying the character style is that it removes any directly applied
formatting and returns you to the format defined in the current
paragraph style. Sorry, but there's no way to avoid that (other than a
character-by-character search for direct formatting, which would be
very slow).
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
>Works great! I even figured out how to change the rgb from the color palette
>so I can play around a bit.
[quoted text clipped - 69 lines]
>> Email cannot be acknowledged; please post all follow-ups to the
>> newsgroup so all may benefit.
adgorn - 09 Oct 2006 01:31 GMT
Since all the shaded words are now of the style you created called
"shadelightgreen", I can go to that style now and just change the font size
and bold setting to whatever I want and it will update all of them, so that
works fine.
I think this will work very well. Again, thank you!

Signature
Alan
> A character style that doesn't specify any other font is defined to
> use "Default Paragraph Font", as this one does. A side effect of
[quoted text clipped - 84 lines]
> >> Email cannot be acknowledged; please post all follow-ups to the
> >> newsgroup so all may benefit.
Jay Freedman - 09 Oct 2006 03:32 GMT
I was under the mistaken impression that only some parts of the
highlighted text were in a different font or weight. When that's the
case, you need to keep the style's font as "Default Paragraph Font".
But if all of the highlighted text to be shaded should be the same
font and weight, you can include those in the definition of the style
when the macro sets it up. For example:
If Not StyleExists Then
.Styles.Add Name:=StyleName, Type:=wdStyleTypeCharacter
.Styles(StyleName).Font.Name = "Times New Roman"
.Styles(StyleName).Font.Size = 10
.Styles(StyleName).Font.Bold = True
.Styles(StyleName).Font.Shading.BackgroundPatternColor = _
StyleColor
End If
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
>Since all the shaded words are now of the style you created called
>"shadelightgreen", I can go to that style now and just change the font size
[quoted text clipped - 91 lines]
>> >> Email cannot be acknowledged; please post all follow-ups to the
>> >> newsgroup so all may benefit.