让WORD在打印时自动加上打印份数编号

 时间:2024-10-12 16:25:16

1、第一步首先找到Word里的宏按钮,如图然后,会弹出宏查看窗口,起一个名字然后选择创建,如图

让WORD在打印时自动加上打印份数编号让WORD在打印时自动加上打印份数编号

2、第二步在弹出的宏录制窗口内输入宏代码,然后保存,如图宏代码如下:Sub PrintCopies()‘‘ Ma艘早祓胂cro1 Macro‘‘Dim i As LongDim lngStartDim lngCountlngCount = InputBox(“Please enter the number of copies you want to print”, “Please enter the number of copies you want to print”, 1)If lngCount = “” ThenExit SubEnd IflngStart = InputBox(“Enter the starting number you want to print”, “Enter the starting number you want to print”, 1)If lngStart = “” ThenExit SubEnd IfFor i = lngStart To lngCountIf i < 10 ThenSelection.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:=0End IfIf (i >= 10) And (i < 100) ThenSelection.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:=0End IfIf (i >= 100) And (i < 1000) ThenSelection.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:=0End IfIf (i >= 1000) And (i < 10000) ThenSelection.TypeText Text:=iApplication.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:=0End IfSelection.TypeBackspaceSelection.TypeBackspaceSelection.TypeBackspaceSelection.TypeBackspaceNextEnd Sub

让WORD在打印时自动加上打印份数编号

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

让WORD在打印时自动加上打印份数编号让WORD在打印时自动加上打印份数编号
  • WORD文档如何每打印一次编号加1
  • excel2019怎么样在表格中快速填充1-100的数字
  • Word中如何实现表格批量填充
  • 怎样实现excel表格与word文档套打
  • Excel在哪可以找到ActiveX滚动条控件命令按钮?
  • 热门搜索
    山西旅游公司 乐亭旅游攻略 旅游网站建设方案 雅加达旅游攻略 法国著名旅游景点 旅游鞋女鞋 成都市区旅游景点大全 潮州旅游攻略 旅游资料 南靖土楼旅游攻略