ms-word - 我可以在 Word 中制作不同的部分吗?不仅有相同的页眉和页脚,而且页码可以作为一个完整的文档对齐
问题描述
基本上,我转到“布局”>“页面设置”>“边距”>“自定义边距”,然后选择“方向”为“横向”,然后选择“应用到:”>“这一点向前”,这改变了方向闪烁光标所在的文档其余页面,然后我在下一页上使用光标重复该过程,但将“方向”选择为“纵向”。这就是我在 Word 文档环境中制作特定页面的方式。发生这种情况时,它会将横向页面划分为“第 2 部分”,然后将页面划分为“第 3 部分”。问题来自页眉和页脚,每个部分的页眉和页脚都不同。这对于页码尤其成问题,
我已经为“第 2 节”到“第 1 节”尝试了“页眉和页脚”>“导航部分”>“链接到上一个”,这根本不会显示从“第 1 节”到“第 2 节”的任何信息。出于某种原因,当我对“第 3 节”到“第 2 节”执行相同操作时,“第 3 节”会显示“第 2 节”的信息,但这并不能解决页码问题,因为“第 3 节”开头为第 1 页。所以我很奇怪“链接到上一个”功能仅在“第 3 节”而不是“第 2 节”上起作用。
如果有人有任何解决此问题的方法,我将不胜感激:D,我也会感谢任何绕过它的狡猾方法,但我不会将其标记为答案。
解决方案
我会将其添加为评论,但它是新的,不允许发表评论。这将在Microsoft Answers站点上得到更好的处理,因为它涉及一般 Word 功能而不是编程。
也就是说,发生的情况是当您创建一个新部分时,很可能在您进行方向转换之前,您告诉 Word 从 1 重新开始编号。Word 以此作为开始新部分的方式。您可以手动转到每个新部分并使用格式页码对话框告诉 word 从上一个继续。
听起来好像您也可能设置了“不同的第一页”。这是一个延续到新部分的设置。具有多个部分的页眉/页脚设置及其交互变得复杂。总结在这里:页眉/页脚设置回顾。
你可以从我的网站下载一个插件来为你做这件事。连续页码加载项。它使用宏来执行此操作。
Sub ContinuousPageNumbersMacro()
'
' ContinuousPageNumbersMacro Macro
' This macro makes page numbering continuous througout document. This is for multisection documents where it may be hard to find page breaks and figure out page numbering changes.
'
' Jay Freedman
' http://answers.microsoft.com/en-us/office/forum/office_2007-word/page-numbers-are-all-fouled-up-in-my-large/d188687e-9663-43e0-a450-1dbadc47f09f
' Can be used as straight macro or attached to keyboard shortcut
' modified to preserve track changes status - idea from Graham Mayor 25 Oct 2017
'
Dim secNum As Long
Dim btnCancel ' give user chance to cancel
Dim bTrackChanges As Boolean
Dim strVersion As String
strVersion = ThisDocument.CustomDocumentProperties("Version").Value
btnCancel = MsgBox(prompt:="Do you want to reset all of the page numbers in this document to number continuously?", _
Title:="Continuous Page Numbering Version " & strVersion & " Are you sure?", _
Buttons:=vbYesNo)
If btnCancel = vbNo Then
MsgBox prompt:="Reset of continuous page numbering cancelled by user!", Buttons:=vbExclamation, Title:="Page Number Reset Cancelled!"
Exit Sub
End If
' Proceed with reset
bTrackChanges = ActiveDocument.TrackRevisions 'Graham Mayor
ActiveDocument.TrackRevisions = False ' Graham Mayor
With ActiveDocument
For secNum = 2 To .Sections.Count
.Sections(secNum).Headers(wdHeaderFooterPrimary) _
.PageNumbers.RestartNumberingAtSection = False
Next
End With
ActiveDocument.TrackRevisions = bTrackChanges 'Graham Mayor
MsgBox prompt:="The Continuous Page Numbers macro has run.", Title:="Page number reset macro finished!"
End Sub
推荐阅读
- c++ - C++透明字符串内存压缩
- azure - CloudBlobClient.startCopyAsync() 的源代码
- c++ - 如何使用指针遍历结构数组中的数组
- javascript - 托管在 firebase 上的 node.js/express.js 无法导出数据库和身份验证侦听器
- excel - 将 If 语句添加到条件格式 VBA 宏
- java - 为什么我可以将数值变量声明为 double 但仍使用 .nextInt()?
- asp.net-core-webapi - NSwag - 为控制器操作中的预期数据提供附加信息
- c++ - 从类模板创建对象的工厂函数模板?
- python - 根据最小子列表的长度对子列表进行下采样
- css - 我正在尝试用 css 做一个自动收报机