Highlighting/Shading Question

K

klav

I have a section of a document that I would like to be shaded or highlighted
but I don't want to see the shading or highlighting when I print the
document.

Short of replacing the default print command with a macro that removes the
shading or highlighting before the document is printed, is there any other
way to achieve this? (It would be similar to the option "show field shading"
that is available in Tools / Options.)
 
P

Perry

You can toggle the colors applicable to the Range object by using:
..Shading.BackgroundPatternColorIndex = wdAuto
..Shading.BackgroundPatternColorIndex = wdYellow

Dim rng as range
set rng = activedocument.sections(2).range
'using above shading statements, will toggle the shading color of variable
"rng" to
either one of 'em.

To override the internal Print command, look here:
http://word.mvps.org/faqs/macrosvba/InterceptSavePrint.htm

There's also the possibility to make use of an Application event, such as:
DocumentBeforePrint()

Pls repost if y're interested.

Krgrds,
Perry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top