Printing footers

S

Steve Wylie

This may sound like an odd request - but is there a way in Word 2000
to ONLY print the footer of a stated range of pages? Normally if I
want to do this I have to select all the text in the main body of the
page and change it to white ink so it doesn't show up when printed. I
wondered if there was an argument in the ActiveDocument.PrintOut
command to print just footers or headers. I have checked in Help and
cannot find anything.

Apart from the method I already use (hidden text is another way but
still involves selecting then changing back afterwards), does anyone
have any suggestions? In the office we regularly need to print out
the footers only from a document so any help would be appreciated.

Steve Wylie
 
J

Jay Freedman

Hi Steve,

Coloring the text white is indeed the only method of getting just footers
(and headers if any) to print. Since hidden text collapses, the number of
pages could change, so that's not good.

But you can automate making the text white, printing, and then using Undo to
pput the regular color back. There's a wrinkle to this, as explained in the
code below...

Sub PrintHeaderFooterOnly()
With ActiveDocument
' marker to limit undo
.Bookmarks.Add Name:="PHFO", _
Range:=.Range(0, 0)

.StoryRanges(wdMainTextStory) _
.Font.Color = wdColorWhite

.PrintOut Background:=False
' alternative to print selected pages:
' Dialogs(wdDialogFilePrint).Show

' since the printing may or may not
' invoke a field update, you don't
' know in advance how many undos are
' needed...
Do While .Bookmarks.Exists("PHFO")
.Undo
Loop
End With
End Sub
 
S

Steve Wylie

Thanks for the reply. I did think afterwards about automating the white-ing
out of the pages. Your method of calculating the Undo's using the existence
of a bookmark is genius.

Playing this macro to white out the pages and print (I did use the
Dialogs(wdDialogFilePrint).Show method in the end) is just as good as a Word
function to print Footers only.

Thanks again.

Steve Wylie
 

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