View Single Post
  #3   Report Post  
Margaret Aldis
 
Posts: n/a
Default

Bottom posted
"Robert M. Franz (RMF)" wrote in message
...
Hi Søren

Søren M. Olesen wrote:
I often write documentation, where I copy&paste lines, with color, from
VisualStudio. However eachtime I apply a style to the text in Word, all
the text turns into black, and the coloring is lost.....Is there a way to
make the style NOT change the coloring??


Not really, no: color is part of the style definition. When you apply a
paragraph style, you'll lose the present color.

Either you manage to apply only a character style (if all you want to
change is Font formatting) and make sure you don't specify any color
there, or you'd probably need a short macro that applies a given style
while retaining the current color.


Another solution might be to create character styles for the colours (define
as default para font + appropriate colour), and use search and replace to
apply the character style to text currently in that colour. Then when you
apply the paragraph style the character style will be retained. Note,
however, that you can't apply more than one character style at a time, so
you couldn't also use Strong, Emphasis etc but would need to stick to direct
formatting.

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk
Word MVP FAQ site: http://www.word.mvps.org