Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Create character style that "imitates" Text Highlight Color
All our templates are locked (limit formatting to a selection of styles...),
and I want to supply the users with a character style that can be used the same way as the Text Highlight Color tool. I have created a character style applied a color in the Shading dialogue. This is not the only character style in the template. There are also styles for bold and italic. The "text coloring" style works well as long as there are no other character styles applied to the text. For instance, if I select a word in a paragraph and mark it as bold using the character style for bold text. If I then I expand the selection to include both the text marked as bold and other text and apply the "coloring style", the bold style is removed. If I then reapply the bold style, the coloring disappears. What I want is to create a style that works the same way as the Text Highlight Color tool which seems to not affect the text it is applied to, except for coloring it of course. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Create character style that "imitates" Text Highlight Color
Unfortunately styles don't work like that. You would need a macro or allow
the users to apply shading or even to use the highlighter to achieve this effect. The macro code to colour the selected text background whilst ignoring the text formatting would be: Selection.Shading.BackgroundPatternColor = wdColorYellow -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: All our templates are locked (limit formatting to a selection of styles...), and I want to supply the users with a character style that can be used the same way as the Text Highlight Color tool. I have created a character style applied a color in the Shading dialogue. This is not the only character style in the template. There are also styles for bold and italic. The "text coloring" style works well as long as there are no other character styles applied to the text. For instance, if I select a word in a paragraph and mark it as bold using the character style for bold text. If I then I expand the selection to include both the text marked as bold and other text and apply the "coloring style", the bold style is removed. If I then reapply the bold style, the coloring disappears. What I want is to create a style that works the same way as the Text Highlight Color tool which seems to not affect the text it is applied to, except for coloring it of course. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Create character style that "imitates" Text Highlight Color
Thanks a lot! That seems to work like a charm. A bit cumbersome, but it works
and I am grateful for that. What would the reverse macro look like, i.e. a macro for removing the color styling (I am not at all familiar with macro coding). If I use the "clear formatting" command (Ctrl+space) all formatting, also the initial bold formatting, i removed. It would be helpful to be able to just remove the color styling. Again, thanks for a rapid reply to my enquiry. "Graham Mayor" wrote: Unfortunately styles don't work like that. You would need a macro or allow the users to apply shading or even to use the highlighter to achieve this effect. The macro code to colour the selected text background whilst ignoring the text formatting would be: Selection.Shading.BackgroundPatternColor = wdColorYellow -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: All our templates are locked (limit formatting to a selection of styles...), and I want to supply the users with a character style that can be used the same way as the Text Highlight Color tool. I have created a character style applied a color in the Shading dialogue. This is not the only character style in the template. There are also styles for bold and italic. The "text coloring" style works well as long as there are no other character styles applied to the text. For instance, if I select a word in a paragraph and mark it as bold using the character style for bold text. If I then I expand the selection to include both the text marked as bold and other text and apply the "coloring style", the bold style is removed. If I then reapply the bold style, the coloring disappears. What I want is to create a style that works the same way as the Text Highlight Color tool which seems to not affect the text it is applied to, except for coloring it of course. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Create character style that "imitates" Text Highlight Color
The following will toggle the backgound colour of the selected text between
yellow and no colour Sub ToggleYellow() With Selection.Shading If .BackgroundPatternColor = wdColorAutomatic Then .BackgroundPatternColor = wdColorYellow Else .BackgroundPatternColor = wdColorAutomatic End If End With End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: Thanks a lot! That seems to work like a charm. A bit cumbersome, but it works and I am grateful for that. What would the reverse macro look like, i.e. a macro for removing the color styling (I am not at all familiar with macro coding). If I use the "clear formatting" command (Ctrl+space) all formatting, also the initial bold formatting, i removed. It would be helpful to be able to just remove the color styling. Again, thanks for a rapid reply to my enquiry. "Graham Mayor" wrote: Unfortunately styles don't work like that. You would need a macro or allow the users to apply shading or even to use the highlighter to achieve this effect. The macro code to colour the selected text background whilst ignoring the text formatting would be: Selection.Shading.BackgroundPatternColor = wdColorYellow -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: All our templates are locked (limit formatting to a selection of styles...), and I want to supply the users with a character style that can be used the same way as the Text Highlight Color tool. I have created a character style applied a color in the Shading dialogue. This is not the only character style in the template. There are also styles for bold and italic. The "text coloring" style works well as long as there are no other character styles applied to the text. For instance, if I select a word in a paragraph and mark it as bold using the character style for bold text. If I then I expand the selection to include both the text marked as bold and other text and apply the "coloring style", the bold style is removed. If I then reapply the bold style, the coloring disappears. What I want is to create a style that works the same way as the Text Highlight Color tool which seems to not affect the text it is applied to, except for coloring it of course. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Create character style that "imitates" Text Highlight Color
Again, thanks for a rapid, and functional, reply to my question. This worked
very well and I am grateful.One final question. Am I going about this the wrong way? Is there a way to selectively activate formatting commands when I have limited what users can do? In this case I am only interested in allowing the users to select and markup text in different colours. "Graham Mayor" wrote: The following will toggle the backgound colour of the selected text between yellow and no colour Sub ToggleYellow() With Selection.Shading If .BackgroundPatternColor = wdColorAutomatic Then .BackgroundPatternColor = wdColorYellow Else .BackgroundPatternColor = wdColorAutomatic End If End With End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: Thanks a lot! That seems to work like a charm. A bit cumbersome, but it works and I am grateful for that. What would the reverse macro look like, i.e. a macro for removing the color styling (I am not at all familiar with macro coding). If I use the "clear formatting" command (Ctrl+space) all formatting, also the initial bold formatting, i removed. It would be helpful to be able to just remove the color styling. Again, thanks for a rapid reply to my enquiry. "Graham Mayor" wrote: Unfortunately styles don't work like that. You would need a macro or allow the users to apply shading or even to use the highlighter to achieve this effect. The macro code to colour the selected text background whilst ignoring the text formatting would be: Selection.Shading.BackgroundPatternColor = wdColorYellow -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: All our templates are locked (limit formatting to a selection of styles...), and I want to supply the users with a character style that can be used the same way as the Text Highlight Color tool. I have created a character style applied a color in the Shading dialogue. This is not the only character style in the template. There are also styles for bold and italic. The "text coloring" style works well as long as there are no other character styles applied to the text. For instance, if I select a word in a paragraph and mark it as bold using the character style for bold text. If I then I expand the selection to include both the text marked as bold and other text and apply the "coloring style", the bold style is removed. If I then reapply the bold style, the coloring disappears. What I want is to create a style that works the same way as the Text Highlight Color tool which seems to not affect the text it is applied to, except for coloring it of course. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Create character style that "imitates" Text Highlight Color
I'm afraid that if you are going to cripple the functions available in Word
for some reason, this will be something you have to live with. User training might be a better plan? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: Again, thanks for a rapid, and functional, reply to my question. This worked very well and I am grateful.One final question. Am I going about this the wrong way? Is there a way to selectively activate formatting commands when I have limited what users can do? In this case I am only interested in allowing the users to select and markup text in different colours. "Graham Mayor" wrote: The following will toggle the backgound colour of the selected text between yellow and no colour Sub ToggleYellow() With Selection.Shading If .BackgroundPatternColor = wdColorAutomatic Then .BackgroundPatternColor = wdColorYellow Else .BackgroundPatternColor = wdColorAutomatic End If End With End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: Thanks a lot! That seems to work like a charm. A bit cumbersome, but it works and I am grateful for that. What would the reverse macro look like, i.e. a macro for removing the color styling (I am not at all familiar with macro coding). If I use the "clear formatting" command (Ctrl+space) all formatting, also the initial bold formatting, i removed. It would be helpful to be able to just remove the color styling. Again, thanks for a rapid reply to my enquiry. "Graham Mayor" wrote: Unfortunately styles don't work like that. You would need a macro or allow the users to apply shading or even to use the highlighter to achieve this effect. The macro code to colour the selected text background whilst ignoring the text formatting would be: Selection.Shading.BackgroundPatternColor = wdColorYellow -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: All our templates are locked (limit formatting to a selection of styles...), and I want to supply the users with a character style that can be used the same way as the Text Highlight Color tool. I have created a character style applied a color in the Shading dialogue. This is not the only character style in the template. There are also styles for bold and italic. The "text coloring" style works well as long as there are no other character styles applied to the text. For instance, if I select a word in a paragraph and mark it as bold using the character style for bold text. If I then I expand the selection to include both the text marked as bold and other text and apply the "coloring style", the bold style is removed. If I then reapply the bold style, the coloring disappears. What I want is to create a style that works the same way as the Text Highlight Color tool which seems to not affect the text it is applied to, except for coloring it of course. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Create character style that "imitates" Text Highlight Color
Yes, I guess you are right. I would like Word to be less blunt when it comes
to limiting what users can do. Anyway, thanks for your help and input which is most appreciated. "Graham Mayor" wrote: I'm afraid that if you are going to cripple the functions available in Word for some reason, this will be something you have to live with. User training might be a better plan? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: Again, thanks for a rapid, and functional, reply to my question. This worked very well and I am grateful.One final question. Am I going about this the wrong way? Is there a way to selectively activate formatting commands when I have limited what users can do? In this case I am only interested in allowing the users to select and markup text in different colours. "Graham Mayor" wrote: The following will toggle the backgound colour of the selected text between yellow and no colour Sub ToggleYellow() With Selection.Shading If .BackgroundPatternColor = wdColorAutomatic Then .BackgroundPatternColor = wdColorYellow Else .BackgroundPatternColor = wdColorAutomatic End If End With End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: Thanks a lot! That seems to work like a charm. A bit cumbersome, but it works and I am grateful for that. What would the reverse macro look like, i.e. a macro for removing the color styling (I am not at all familiar with macro coding). If I use the "clear formatting" command (Ctrl+space) all formatting, also the initial bold formatting, i removed. It would be helpful to be able to just remove the color styling. Again, thanks for a rapid reply to my enquiry. "Graham Mayor" wrote: Unfortunately styles don't work like that. You would need a macro or allow the users to apply shading or even to use the highlighter to achieve this effect. The macro code to colour the selected text background whilst ignoring the text formatting would be: Selection.Shading.BackgroundPatternColor = wdColorYellow -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Hallsjo wrote: All our templates are locked (limit formatting to a selection of styles...), and I want to supply the users with a character style that can be used the same way as the Text Highlight Color tool. I have created a character style applied a color in the Shading dialogue. This is not the only character style in the template. There are also styles for bold and italic. The "text coloring" style works well as long as there are no other character styles applied to the text. For instance, if I select a word in a paragraph and mark it as bold using the character style for bold text. If I then I expand the selection to include both the text marked as bold and other text and apply the "coloring style", the bold style is removed. If I then reapply the bold style, the coloring disappears. What I want is to create a style that works the same way as the Text Highlight Color tool which seems to not affect the text it is applied to, except for coloring it of course. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to replace "enter character" with "space character" in msword | Microsoft Word Help | |||
Changing 'Highlight" color | New Users | |||
How do I create a style with the text "NOTE:" at the begining? | New Users | |||
My character style has become a "paragraph and character" style | Microsoft Word Help | |||
How do I change the highlight color of "selected" text? | Microsoft Word Help |