Want hyperlinks to display as links, but print as "normal" text

T

Timmah!

I am a technical writer for an aerospace company. Our documentation is used
mainly in-house and is viewed on-line so I need hyperlinks (links to other,
internal documentation) to appear on-screen in the "standard" blue underlined
format. However, on occasion, I do need to actually print a hard copy, and I
would like to find a way for the links to print as normal text in these
cases. I know that I can change the formatting via the STYLES options, but I
would like to avoid having to reformat the appearance of the links every time
I need to print. Is this do-able?
 
J

Jay Freedman

Timmah! said:
I am a technical writer for an aerospace company. Our documentation
is used mainly in-house and is viewed on-line so I need hyperlinks
(links to other, internal documentation) to appear on-screen in the
"standard" blue underlined format. However, on occasion, I do need to
actually print a hard copy, and I would like to find a way for the
links to print as normal text in these cases. I know that I can
change the formatting via the STYLES options, but I would like to
avoid having to reformat the appearance of the links every time I
need to print. Is this do-able?

Yes, it's possible. You need macros that intercept the File > Print menu
item and the Print toolbar button (which are separate internal commands) to
change the format, print, and then undo the change. See
http://www.word.mvps.org/FAQs/MacrosVBA/InterceptSavePrint.htm.

Add these two macros to the template(s) used as the base for the
documentation (see http://www.gmayor.com/installing_macro.htm if needed):

Sub FilePrint()
With ActiveDocument.Styles("Hyperlink")
.Font.Color = wdColorAutomatic
.Font.Underline = wdUnderlineNone
End With

Dialogs(wdDialogFilePrint).Show

ActiveDocument.Undo
ActiveDocument.Undo
End Sub

Sub FilePrintDefault()
With ActiveDocument.Styles("Hyperlink")
.Font.Color = wdColorAutomatic
.Font.Underline = wdUnderlineNone
End With

ActiveDocument.PrintOut Background:=False

ActiveDocument.Undo
ActiveDocument.Undo
End Sub


--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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