Styles that display but don't print

J

Jeff

Is it possible to format text that displays in a document but does not
print?
(This can be done for Excel macro-buttons - you set the property as
non-printing)

Jeff
 
C

Charles Kenyon

Yes, you can format it as hidden and set your view options to show hidden
text. However, I think if you format the display text of a macrobutton in
Word as hidden, it will not display.
 
J

Jeff

Unfortunately that's too broad a brush - there is other hidden text in the
document that I want to remain hidden.

Jeff
 
J

Jay Freedman

Hi Jeff,

If you want the space occupied by the nonprinting text to collapse during
printing, then Hidden is the only attribute you can use.

If it's ok to maintain the space, you can define a character style that you
apply to each area of nonprinting text. Change the style's font color to
white, print, and change the color back to black. A macro can do all the
color changes and printing in one step. Reply if you need more information.
 
J

Jeff

I think I understand

There may be a combination of hidden paragraph styles and hidden font styles
that allows me to achieve my objective. I'll experiment.

This should be a wish-list item

"Dear Mr. Microsoft
Please can I have a font property that makes it visible on screen
but hidden when printed. This will allow me to add document
navigation hyperlinks that are usable in the on-screen document
yet omitted from the printed document."

Jeff
 
K

Klaus Linke

"Dear Mr. Microsoft
Please can I have a font property that makes it visible on screen
but hidden when printed. This will allow me to add document
navigation hyperlinks that are usable in the on-screen document
yet omitted from the printed document."


Hi Jeff,

The correct address for this is
Santa Claus
North Pole

No... no wait... it's
http://register.microsoft.com/mswish/suggestion.asp

You could also post it as a suggestion in this newsgroup, if you use the beta web interface:
http://beta.communities.microsoft.c...t.aspx?dg=microsoft.public.word.docmanagement

Usually, MS doesn't monitor these newsgroups, but they should look at your suggestion, especially if it should get a lot of votes from other users.

Regards,
Klaus
 
J

Jeff

Change the style's font color to
white, print, and change the color back to black. A macro can do all the
color changes and printing in one step. Reply if you need more
information.

I'm sure I can do that with a macro and yes, it's ok to maintain the space
during printing.

Can you remind me how to substitute the Print command in a document so it
runs my alternative macro.

Jeff
 
S

Suzanne S. Barnhill

Name your macro FilePrint or FilePrintDefault. Needless to say, it needs to
include the functions of the original command.
 
J

Jay Freedman

Hi Jeff,

To be more explicit about what needs to be done:

- First, define a character style, adding it to the template. The name
can be whatever you want, let's say NonPrint. It can have the same
formatting as the default style, or it can have your choice of font
name and size. Apply that style to each piece of text (in any document
based on this template) that should display but not print.

- In the same template, create two macros. One that's named FilePrint
will run when you use the menu item or the Ctrl+P shortcut, which
normally shows the Print dialog. One that's named FilePrintDefault
will run when you click the Print button on the toolbar, which
bypasses the dialog.

- Make the contents of the macros as follows:

Public Sub FilePrint()
On Error Resume Next
With ActiveDocument
.Styles("NonPrint").Font.Color = wdColorWhite
Dialogs(wdDialogFilePrint).Show
.Styles("NonPrint").Font.Color = wdColorAutomatic
End With
End Sub

Public Sub FilePrintDefault()
On Error Resume Next
With ActiveDocument
.Styles("NonPrint").Font.Color = wdColorWhite
.PrintOut Background:=False
.Styles("NonPrint").Font.Color = wdColorAutomatic
End With
End Sub
 
J

Jeff

Excellent that does the trick

The only problem is that now, when the file loads, Word's anti-virus
protection mumbles about unsigned macros. The only way round this is to set
it to trust access to VBA projects - which may no be allowed in the
environment in which this will be deployed!

So... is there an FAQ somewhere that explains how to sign a macro?

Jeff
 

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