Jean-Guy
Thu Sep 07 14:28:06 CDT 2006
klav was telling us:
klav nous racontait que :
> I'm interested in having certain pieces of text highlighted or shaded
> on the screen but not when printed. What's the easiest way to
> accomplish this?
You could intercept the Print command, remove the highlight, print, then
undo:
'_______________________________________
Sub FilePrint()
ActiveDocument.Range.HighlightColorIndex = wdNoHighlight
Dialogs(wdDialogFilePrint).Show
ActiveDocument.Undo
End Sub
'_______________________________________
'_______________________________________
Sub FilePrintDefault()
With ActiveDocument
.Range.HighlightColorIndex = wdNoHighlight
.PrintOut
.Undo
End With
End Sub
'_______________________________________
The subs must be named as they are here. Then, whenever a user does CTRL-P,
File > Print or clicks on the Print button on the standard toolbar, the code
will run instead.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site:
http://www.word.mvps.org