Hi,
I would like to move the contents of a footnote in place of references to it (between characters |)
I found this macro:
- Is almost good, but unfortunately the copied text loses formatting (like bold, italic).
How can I keep the formatting?
Mike
I would like to move the contents of a footnote in place of references to it (between characters |)
I found this macro:
Code:
Dim oFeets As Footnotes
Dim oFoot As Footnote
Dim oRange As Range
Dim szFootNoteText As String
' Grabs the collection of FootNotes
Set oFeets = Word.ActiveDocument.Footnotes
' Iterates through each footnote
For Each oFoot In oFeets
szFootNoteText = oFoot.Range.Text
'Start search from beginning of document
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Text = "^f" ' Looks for all footnotes
.Forward = True
.Wrap = wdFindStop
End With
Selection.Find.Execute
' Delete the footnote
oFoot.Delete
'Insert the footnote text
'Here you do whatever format tickles your fancy
Selection.Text = "|" + szFootNoteText + "|"
Next
- Is almost good, but unfortunately the copied text loses formatting (like bold, italic).
How can I keep the formatting?
Mike