View Single Post
 
Old 01-24-2018, 10:10 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

While Paul's suggestion is ingenious, you could also do it without modifying the document:
Code:
Sub CopyPage()
Dim oRng As Range, oEnd As Range
Dim lngCopies As Long, i As Long
    lngCopies = InputBox("How many copies?")
    Set oRng = ActiveDocument.Bookmarks("\page").Range
    For i = 1 To lngCopies
        ActiveDocument.Range.InsertAfter Chr(12)
        Set oEnd = ActiveDocument.Range
        oEnd.Collapse 0
        oEnd.FormattedText = oRng.FormattedText
    Next i
lbl_Exit:
    Set oRng = Nothing
    Set oEnd = Nothing
    Exit Sub
End Sub
If you have a page number field in your document, you need to decide how you want the numbering to appear in the finished document. If you want 1 on each page then change the field for '1' as text; however if you do that it is difficult to see the point of the document. If you want to print a number of copies then why duplicate them first? If you want numbered printed copies then see http://www.gmayor.com/automatic_numbering_documents.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote