Log in

View Full Version : Footnote Formatting



gmaxey
08-21-2010, 08:07 AM
I have a document with a gazillion footnotes. It has (now has) a properly defined footnote reference style and a footnote style.

The footnote reference style uses a font superscript attribute. In some places in the document the footnote reference in the text is properly formatted, but that reference number in the footnote storyrange is normal font.

Apparently at some point an editor has selected the entire footnote including the number and applied the footnote style.

I can't seem to find and isolate that number to reset the formatting and reapply the proper footnote reference style.

I have tried:

Sub ScratchMacoro()
Dim oFN As Footnote
For Each oFN In ActiveDocument.StoryRanges(wdFootnotesStory).Footnotes
oFN.Reference.Font.Reset
oFN.Reference.Style = "Footnote Reference"
Next
End Sub


But that acts on the reference in the main text "NOT" the footnote storyrange.

Any ideas? Thanks.

gmaxey
08-21-2010, 08:51 AM
This seems to work:

Sub SetFootnoteStyle()
Dim oFN As Footnote
Dim oPar As Paragraph
For Each oFN In ActiveDocument.Footnotes
For Each oPar In oFN.Range.Paragraphs
oPar.Range.Style = "Footnotes"
Next
Next
CheckSetFootNoteRef
End Sub

Sub CheckSetFootNoteRef()
Dim oFN As Footnote
Dim oRng As Word.Range
Dim oPar As Paragraph
For Each oFN In ActiveDocument.StoryRanges(wdFootnotesStory).Footnotes
Set oRng = oFN.Range
oRng.Collapse wdCollapseStart
oRng.MoveStart wdWord, -1
oRng.Style = "Footnote Reference"
Next
End Sub

Always interested in finding a better way. Thanks.