How do I use line numbering but not have it show on print?

J

Jay Freedman

Meinert said:
I do not want the line numbers to show in printed material.

Go into the Page Setup dialog and turn off line numbering before you print.
If you want it, turn the numbering on again afterward.

To automate this, install the following macros in your Normal template (see
http://www.gmayor.com/installing_macro.htm if needed):

Sub FilePrint()
' intercepts built-in File > Print or Ctrl+P
' and prints without line numbering
Dim userLineNum As Boolean

With ActiveDocument.PageSetup.LineNumbering
userLineNum = .Active
.Active = False
Dialogs(wdDialogFilePrint).Show
.Active = userLineNum
End With
End Sub

Sub FilePrintDefault()
' intercepts built-in Print toolbar button
' and prints without line numbering
Dim userLineNum As Boolean

With ActiveDocument.PageSetup.LineNumbering
userLineNum = .Active
.Active = False
ActiveDocument.PrintOut Background:=False
.Active = userLineNum
End With
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