Please Note: This article is written for users of the following Microsoft Word versions: 2007 and 2010. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Including a Printer's Name in a Footer.

Including a Printer's Name in a Footer

by Allen Wyatt
(last updated June 3, 2016)

1

Abdul works in an office where he has access to five printers from his computer. When he prints a document, he wants the footer to contain the name of the printer on which the document was printed, as in "Printed on: HP LaserJet 1320."

Provided that the document is being sent to a specific printer and not to a printer pool to which all five printers belong, the necessary footer information can be added through the use of a macro. The reason that it cannot be done if the printers are in a pool is because divvying up the print jobs to individual printers in a print pool is done by Windows itself, not by Word.

For an example of a macro you could use, consider this one:

Sub AddPrinterName()
    Dim sPName As String

    ' Get the printer name
    sPName = Trim(Left(ActivePrinter, InStr(ActivePrinter, " on ")))

    ' Close any special pane
    If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
        ActiveWindow.Panes(2).Close
    End If

    ' Activate print view
    If ActiveWindow.ActivePane.View.Type = wdNormalView _
      Or ActiveWindow.ActivePane.View.Type = wdOutlineView Then
        ActiveWindow.ActivePane.View.Type = wdPrintView
    End If

    ' Open header/footer
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

    ' Switch to footer
    If Selection.HeaderFooter.IsHeader = True Then
        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
    Else
        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    End If

    ' Insert text and printer
    Selection.TypeText Text:="Printed on: " & sPName

    ' Tidy up
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

This macro will insert the active printer's name into the footer. You can, if desired, trigger this macro from the DocumentBeforePrint event and you'll be sure that the footer has the required information in it whenever you choose to print. If you do so, of course, you'll want to make sure that you modify the macro slightly so that it selects any previously placed footer information and deletes it before inserting the new footer information.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9771) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word here: Including a Printer's Name in a Footer.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Printing a Short Selection

Want to print just a selection from within your document? It's easy to do when you print using the Print dialog box.

Discover More

Problems Pasting Large Pictures

If you insert a large picture in your document and your text jumps all around and the picture seems to disappear, don't ...

Discover More

Segregating Numbers According to Their Sign

Remember your number line from your early years in school? Some numbers can be below zero (negative numbers) and others above ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

MORE WORDTIPS (RIBBON)

Paragraph Numbers in Headers or Footers

If your documents routinely use numbered paragraphs, you may want to place the number of the page's first paragraph in the ...

Discover More

Positioning Headers and Footers

Headers and footers can add a finishing touch to your printed documents. Here's how you can position those headers and ...

Discover More

Placing the First Two Words from the Following Page In the Footer

Headers and footers can be used for all sorts of information to help orient your document reader. In fact, Word provides many ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments for this tip:

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is nine more than 1?

2014-05-21 12:51:26

Martin Shingler

Hi, I would like to go further with this concept. Our procedures are stored accessed and controlled on a database which is maintained under a quality system. Paper copies are not controlled - but they are often useful. What I want to do is automatically have "Printed Version Document is Uncontrolled" - or similar, displayed in red in the header on the printed copy, but leave the electronic copy on the database looking clean without that text visible.
I tried to produce a white textbox that obscured the text but did not print - but I could not set just one textbox not to print. I think that I will have to use a macro triggering on DocumentBeforePrint and delete (or hide) the text after printing. I note that a solution for this part is to use ActiveDocument.PrintOut Background:=False
to pause the macro until printing has finished and then the text can be hidden again.
Please could I have some guidance on this?

Thanks

Martin


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.

Links and Sharing