Word VBA选择特定部分的特定页面
我在打击代码中使用 p1s11,s9,s12 以打印第11节和第9节(完全)和第12节(完全)(完全),
Application.PrintOut OutputFileName:=FinalNamePath,
Range:=wdPrintRangeOfPages, Item:=wdPrintDocumentWithMarkup,
Copies:=1, Pages:"p1s11,s9,s12", PageType:=wdPrintAllPages,
Collate:=True, Background:=True,
PrintToFile:=False,PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0,PrintZoomPaperHeight:=0
现在我想选择第11节和第9章和第12节
我经常搜索了很多,我得到了以下选择,
ActiveDocument.Sections(11).Range.Select
但它也选择了整个部分
,我找到了以下选择以进行数值选择,
With ActiveDocument
.Range(.Sections(2).Range.Start, .Sections(5).Range.End).Select
Selection.Copy
End With
但它仅选择了顺序的部分(完全)
我想选择第11节和第9节(完全)和第12节(
)
完全
I use p1s11,s9,s12 in blow code to print page 1 of section 11 and section 9 (entirely) and section 12 (entirely)
Application.PrintOut OutputFileName:=FinalNamePath,
Range:=wdPrintRangeOfPages, Item:=wdPrintDocumentWithMarkup,
Copies:=1, Pages:"p1s11,s9,s12", PageType:=wdPrintAllPages,
Collate:=True, Background:=True,
PrintToFile:=False,PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0,PrintZoomPaperHeight:=0
now I want to select page 1 of section 11 and section 9 and section 12
I searched a lot and I get the below for single selection
ActiveDocument.Sections(11).Range.Select
but it selects the entire section
also, I found the below for multible selection
With ActiveDocument
.Range(.Sections(2).Range.Start, .Sections(5).Range.End).Select
Selection.Copy
End With
but it selects sequential sections only (entirely)
I want to select page 1 of section 11 and section 9 (entirely) and section 12 (entirely)
in not sequential sections
how to do this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论