printing a single page many times with different numbers on...


G

Guest

I have a single laboratory book page that I need to print out many times with
a different number on each page. The only way I found to do this so far is to
have a file with 100 pages and then use the page number feature, changing the
"start at" to the number range that I need. For some reason my machine does
not like such a large file (I have plenty of memory) Surely there is a simple
way round this?
 
Ad

Advertisements

S

Suzanne S. Barnhill

G

Greg

Mr. C,

Try using this macro:

Sub NumberCopies()
Dim NumCopies
Dim StartNum
If ActiveDocument.Saved = False Then
If MsgBox("Do you want to save any changes before" & _
"printing?", vbYesNoCancel) = 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))
Dim oRng As Range
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
 
G

Graham Mayor

Greg's macro solution works quite well, but the important bit that he forgot
to mention is that the macro writes the page number at the cursor position,
so if you want the page number in the header/footer you had better make sure
that's where your cursor is before running the macro.
 
G

Graham Mayor

Greg forgot to mention the important part - that the page number is placed
at the current cursor position, so if you want the page number in the
header/foote that's where the cursor needs to be before running the macro.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Ad

Advertisements

G

Graham Mayor

Oops - an echo :)

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Ad

Advertisements


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