如何将脚注引用从段落中间移到段落末尾?Word 2013

如何将脚注引用从段落中间移到段落末尾?Word 2013

我使用 tohuwawohu 的以下宏将我的评论转换为脚注(非常有用,谢谢)但由于我的评论放置方式,结果大多数脚注引用(文本 1、2 等中的数字)都位于句子中间的尴尬位置。

是否有宏或其他方法可以将其移动到句子/段落的末尾?

链接和宏:

如何自动将 Word 2010 文档中的所有注释转换为脚注?

Sub comment2footnote()
  Application.ScreenUpdating = False
  Dim oDoc As Document, oComment As Comment
  Set oDoc = ActiveDocument
  For Each oComment In ActiveDocument.Comments
      oDoc.Footnotes.Add Range:=oComment.Scope, Text:=oComment.Range.Text
      oComment.Delete
  Next
  Application.ScreenUpdating = True
End Sub

答案1

(假设在这个例子中,注释在单个段落/句子内)在 For 循环的第一行代码中编辑范围。

将评论放在段落末尾:

oDoc.Footnotes.Add Range:=oComment.Scope.Paragraphs(1).Range, Text:=oComment.Range.Text

放在句子末尾 - 如果在句号后使用 2 个空格,那么句号和脚注引用之间会留一个空格。您可以在末尾添加第二个 .Previous(即 .Last.Previous.Previous),但如果您的句子位于段落末尾,向后移动 2 个字符可能会将脚注放在句号之前:

  oDoc.Footnotes.Add Range:=oComment.Scope.Sentences(1).Characters.Last.Previous, Text:=oComment.Range.Text

相关内容