Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Highlighting/Shading Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
klav - 26 Jan 2007 15:05 GMT
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.)
Perry - 28 Jan 2007 13:04 GMT
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

>I have a section of a document that I would like to be shaded or
>highlighted
[quoted text clipped - 6 lines]
> shading"
> that is available in Tools / Options.)

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.