[ macro to change autonumbered footnotes to footnotes *, **, ***, ****, ... and
back]
Gezgin said:
That is a really nifty macro, Klaus. Thanks for posting it. It seems to
have one problem however: I want the asterisk-format footnotes to
restart on each page, otherwise one ends up with strings of asterisks
that become too long. This macro doesn't restart the numbering on a
new page even though that option is selected in the footnote menu.
Can this be fixed?
Hi Bob,
Sure, see macro below.
You may have to fix your asterisk footnotes a lot (= run macro twice to change
to autonumbered and back).
Since an asterisk footnote like ***** takes more space than a simple footnote,
the text might reflow and even force that footnote to the top of the next page,
so the macro isn't 100% reliable.
Regards,
Klaus
Sub ToggleAsteriskFootnotes()
Dim myFootnote As Footnote
Dim boolCustom As Boolean
Dim i As Long, iOld As Long
' first footnote reference = "*" ?
boolCustom = _
(AscW(ActiveDocument.Footnotes(1).Reference.Text) = 42)
If boolCustom = True Then
For i = ActiveDocument.Footnotes.Count To 1 Step -1
Set myFootnote = ActiveDocument.Footnotes(i)
myFootnote.Range.Copy
myFootnote.Reference.Select
myFootnote.Delete
ActiveDocument.Footnotes.Add Selection.Range
Selection.Footnotes(1).Range.Paste
ActiveDocument.Footnotes(i).Reference.Font.Name = _
ActiveDocument.Styles(wdStyleFootnoteReference).Font.Name
Next i
Else
For i = ActiveDocument.Footnotes.Count To 1 Step -1
ActiveDocument.Footnotes(i).Reference.Select
Selection.start = ActiveDocument.Bookmarks("\page").start
iOld = Selection.Footnotes.Count
Set myFootnote = ActiveDocument.Footnotes(i)
myFootnote.Range.Copy
myFootnote.Reference.Select
myFootnote.Delete
ActiveDocument.Footnotes.Add _
Range:=Selection.Range, _
Reference:=String(iOld, "*")
Selection.Footnotes(1).Range.Paste
ActiveDocument.Footnotes(i).Reference.Font.Name = _
ActiveDocument.Styles(wdStyleFootnoteReference).Font.Name
Next i
End If
End Sub