How to number identical printed pages?

  • Thread starter David Mayerovitch
  • Start date
D

David Mayerovitch

Using Microsoft Word 2003, I am creating a 30-page writing pad with lines
spaced according to my own requirements. I would like each page to have a
sequential page number.

Obviously I could do this by copying the first page 30 times and inserting a
normal page number. But can anyone suggest a neater way to do this using a
numerical field code in a single-page file that would increment itself with
every copy printed? Or maybe involving Mail Merge commands?

And would the process be any different in Word 2007?

Thanks.

David
 
G

Graham Mayor

The following macro will print numbered copies of the same page. Put your
cursor where you want the number to appear then run the macro

Sub PrintNumberedCopies()
Dim NumCopies
Dim startNum
Dim oRng As Range

If MsgBox("The number will be placed at the cursor. Is the cursor placed " &
_
"at the correct position?", vbYesNo) = vbNo Then End
If ActiveDocument.Saved = False Then
If MsgBox("Do you want to save any changes before" & _
"printing?", vbYesNo) = vbYes Then
ActiveDocument.Save
End If
End If
NumCopies = Val(InputBox("Enter the number of copies " & _
"that you want to print", "PrintNumbered Copies ", 1))
startNum = Val(InputBox("Enter the starting number", "Start at:", 1))

ActiveDocument.Bookmarks.Add name:="CopyNum", Range:=Selection.Range
Set oRng = ActiveDocument.Bookmarks("CopyNum").Range
Counter = startNum - 1
While Counter < NumCopies + startNum - 1
Counter = Counter + 1
oRng.Delete
oRng.Text = Counter
ActiveDocument.PrintOut
Wend
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
D

David Mayerovitch

Thanks, Graham!

David

Graham Mayor said:
The following macro will print numbered copies of the same page. Put your
cursor where you want the number to appear then run the macro

Sub PrintNumberedCopies()
Dim NumCopies
Dim startNum
Dim oRng As Range

If MsgBox("The number will be placed at the cursor. Is the cursor placed "
& _
"at the correct position?", vbYesNo) = vbNo Then End
If ActiveDocument.Saved = False Then
If MsgBox("Do you want to save any changes before" & _
"printing?", vbYesNo) = vbYes Then
ActiveDocument.Save
End If
End If
NumCopies = Val(InputBox("Enter the number of copies " & _
"that you want to print", "PrintNumbered Copies ", 1))
startNum = Val(InputBox("Enter the starting number", "Start at:", 1))

ActiveDocument.Bookmarks.Add name:="CopyNum", Range:=Selection.Range
Set oRng = ActiveDocument.Bookmarks("CopyNum").Range
Counter = startNum - 1
While Counter < NumCopies + startNum - 1
Counter = Counter + 1
oRng.Delete
oRng.Text = Counter
ActiveDocument.PrintOut
Wend
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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