View Single Post
 
Old 08-16-2019, 08:23 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

Insert a text content control where you want the number to be displayed and title it Startnumber then:

Code:
Sub PrintJobs()
Dim i As Long, startnum As Long, lastnum As Long

    startnum = InputBox("Enter the first job number to be printed", "Print Job Number", 1)
    lastnum = InputBox("Enter the last job number to be printed", "Print Job Number", 1)

    For i = startnum To lastnum
        ActiveDocument.SelectContentControlsByTitle("Serialnumber").Item(1).Range.Text = i
        ActiveDocument.PrintOut
    Next

End Sub
See also Auto number documents
__________________
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