更改脚注的顺序
Change the Order of the Footnotes
我愿意change the footnote in the text. More specifically I want to put the full stop after the footnote like in this concept。
网上好像只能用宏解决了,不知道从何下手
我只发现这个脚本接近解决方案
Sub UpdateFootnotes()
'Update fields in all footnotes.
Dim doc As Document
Dim rng As Range
Set doc = ActiveDocument
If doc.Footnotes.Count <> 0 Then
'Select all footnotes.
Set rng = doc.Footnotes(1).Range
rng.WholeStory
rng.Select
'Update all fields.
Selection.Fields.Update
End If
End Sub
我需要为我的学士论文做这件事,这真的对我有很大帮助!
编辑:来自 Microsoft forums here
中发布的答案
您找到的宏与更改脚注引用的位置无关;它只是更新脚注中的任何字段。
以下宏处理脚注和尾注。
Sub FootnoteEndnoteFix()
Application.ScreenUpdating = False
Dim FtNt As Footnote, EndNt As Endnote, Rng As Range
With ActiveDocument
For Each FtNt In .Footnotes
Set Rng = FtNt.Reference
With Rng
'Eliminate any spaces before the footnote
While .Characters.First.Previous.Text = " "
.Characters.First.Previous.Text = vbNullString
Wend
'Swap the footnote/punctuation, as applicable
Select Case .Characters.First.Previous
Case ".", ",", "!", "?", ":", ";"
.InsertAfter .Characters.First.Previous
.Characters.First.Previous.Text = vbNullString
.Characters.Last.Font.Superscript = False
End Select
End With
Next
For Each EndNt In .Endnotes
Set Rng = EndNt.Reference
With Rng
'Eliminate any spaces before the endnote
While .Characters.First.Previous.Text = " "
.Characters.First.Previous.Text = vbNullString
Wend
'Swap the endnote/punctuation, as applicable
Select Case .Characters.First.Previous
Case ".", ",", "!", "?", ":", ";"
.InsertAfter .Characters.First.Previous
.Characters.First.Previous.Text = vbNullString
.Characters.Last.Font.Superscript = False
End Select
End With
Next
End With
Application.ScreenUpdating = True
End Sub
我愿意change the footnote in the text. More specifically I want to put the full stop after the footnote like in this concept。 网上好像只能用宏解决了,不知道从何下手
我只发现这个脚本接近解决方案
Sub UpdateFootnotes()
'Update fields in all footnotes.
Dim doc As Document
Dim rng As Range
Set doc = ActiveDocument
If doc.Footnotes.Count <> 0 Then
'Select all footnotes.
Set rng = doc.Footnotes(1).Range
rng.WholeStory
rng.Select
'Update all fields.
Selection.Fields.Update
End If
End Sub
我需要为我的学士论文做这件事,这真的对我有很大帮助!
编辑:来自 Microsoft forums here
中发布的答案您找到的宏与更改脚注引用的位置无关;它只是更新脚注中的任何字段。
以下宏处理脚注和尾注。
Sub FootnoteEndnoteFix()
Application.ScreenUpdating = False
Dim FtNt As Footnote, EndNt As Endnote, Rng As Range
With ActiveDocument
For Each FtNt In .Footnotes
Set Rng = FtNt.Reference
With Rng
'Eliminate any spaces before the footnote
While .Characters.First.Previous.Text = " "
.Characters.First.Previous.Text = vbNullString
Wend
'Swap the footnote/punctuation, as applicable
Select Case .Characters.First.Previous
Case ".", ",", "!", "?", ":", ";"
.InsertAfter .Characters.First.Previous
.Characters.First.Previous.Text = vbNullString
.Characters.Last.Font.Superscript = False
End Select
End With
Next
For Each EndNt In .Endnotes
Set Rng = EndNt.Reference
With Rng
'Eliminate any spaces before the endnote
While .Characters.First.Previous.Text = " "
.Characters.First.Previous.Text = vbNullString
Wend
'Swap the endnote/punctuation, as applicable
Select Case .Characters.First.Previous
Case ".", ",", "!", "?", ":", ";"
.InsertAfter .Characters.First.Previous
.Characters.First.Previous.Text = vbNullString
.Characters.Last.Font.Superscript = False
End Select
End With
Next
End With
Application.ScreenUpdating = True
End Sub