如何为word文档添加序号,每打印一份递增一

要用word打印工作票,票面内容已编辑好。现在需要一个编号,每打印一次编号自动递增,需要打印的数量不定,不是一下子打印完,可能一天打印一张,也可能一天打印数张,或者不打印。想要达到的目的每次我打印时,只编辑其他内容,不需要干预编号,它就自动增长。比如,设置编号是NO.10001,打印一次他的编号就是NO.10002,以此类推,请问高手如何实现?

    首先找到Word里的宏按钮

    弹出宏查看窗口,起一个名字然后选择创建

    在弹出的宏录制窗口内输入宏代码,然后保存,宏代码见下方。

    把输入光标放在想要添加打印份数编号的地方,然后运行宏,会弹出如下窗口,第一个窗口是输入打印份数,第二个窗口是输入起始数字


      宏代码如下:

  Sub PrintCopies()

  Macro1 Macro

  Dim i As Long

  Dim lngStart

  Dim lngCount

  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

  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

  If i < 10 Then

  Selection.TypeText Text:=”000″ & i&

  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

  End If

  If (i >= 10) And (i < 100) Then

  Selection.TypeText Text:=”00″ & i&

  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

  End If


  If (i >= 100) And (i < 1000) Then

  Selection.TypeText Text:=”0″ & i&

  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

  End If

  If (i >= 1000) And (i < 10000) Then

  Selection.TypeText Text:=i

  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

  End If

  Selection.TypeBackspace

  Selection.TypeBackspace

  Selection.TypeBackspace

  Selection.TypeBackspace

  Next

  End Sub

温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-01-22
可以有这个功能的。把邮件合并用上。在excel表格中添加编号列,把编号从NO.10001拉到你所需要打印的比如NO.10100 ,然后把数量源的表格与WORD票印相连接 再生成打印页 就会从一拉到100的票号
第2个回答  2014-01-22
word恐怕没有这个功能。
你打印后不是要存一份在电脑里吗?建一个专门的文件夹,直接复制文件,并将文件名命名为编号就行了。我们发交办单就是这样做的。本回答被网友采纳
第3个回答  2018-10-04

试试这款吧。勾选递增打印即可。

第4个回答  2014-01-22
这个只能人工改一下文件名了,在文件名后加序号。
相似回答