'''
Sub PrintCopies()
Dim i As Long
Dim lngStart
Dim lngCount
Dim rngDoc As Range
'提示需要打印多少份
lngCount = InputBox("Please enter the number of copies you want to print", "Please enter the number of copies you want to print", 1)
If lngCount = "" Then
Exit Sub
End If
'提示本次打印从哪个号码开始打印,默认为1
lngStart = InputBox("Enter the starting number you want to print", "Enter the starting number you want to print", 1)
If lngStart = "" Then
Exit Sub
End If
For i = lngStart To lngCount
'编号的位置,依实际状况不同,需要修改Start和End的值
'Set rngDoc = ActiveDocument.Range(Start:=22, End:=25)
Set rngDoc = ActiveDocument.Tables(1).Cell(1, 1).Range
'数字不满3位时前面补0
If i < 10 Then
rngDoc.Text = "00" & i
End If
If (i >= 10) And (i < 100) Then
rngDoc.Text = "0" & i
End If
If (i >= 100) And (i < 1000) Then
rngDoc.Text = i
End If
'调用打印
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
'未使用此方法,相当于在当前选择项上按Backspace键
'Selection.TypeBackspace
Next
End Sub
'''