Wordの脚注一覧を作成するマクロ
Word文書中の脚注を一覧にまとめるマクロです。
脚注の文字列を集めて、文書の最後に挿入します。
Sub 脚注一覧作成()
Dim n, i As Long
Dim rt As String
With ActiveDocument.Content
.InsertAfter "【脚注一覧】"
.InsertParagraphAfter
For n = 1 To ActiveDocument.Footnotes.Count
With ActiveDocument.Footnotes(n)
i = .Index
rt = .Range.Text
End With
.InsertAfter i & ">" & rt
.InsertParagraphAfter
Next n
End With
End Sub
Dim n, i As Long
Dim rt As String
With ActiveDocument.Content
.InsertAfter "【脚注一覧】"
.InsertParagraphAfter
For n = 1 To ActiveDocument.Footnotes.Count
With ActiveDocument.Footnotes(n)
i = .Index
rt = .Range.Text
End With
.InsertAfter i & ">" & rt
.InsertParagraphAfter
Next n
End With
End Sub
[ 2013年2月20日 | カテゴリー: Word | タグ: VBA , 脚注 ]
« コストコ広島の駐車料金は1時間3千円 | Wordの脚注と括弧書きを相互に変換するマクロ »
コメント
-
そうなんですね,残念です.
お返事ありがとうございました!
お世話になります.初心者です.
取り出したテキストはイタリックや太字が解除されてしまうのですが,どこを変えればよいでしょうか?