P
philmwebb
I wish to collect the actual text displayed in the footnote references in my
document. Of course, just using Footnote.Index only gives you a numeric
index, and while you can query the FootnoteOptions to work out that the
format is say, lowercase letter, this doesn't help if the document editor
has chosen to restart the footnote numbering at some point. And
Reference.Text just returns an ASCII char 2.
The following code shows an example of collecting each footnote and its
reference. How do I collect the Reference's displayed text?
Dim doc As Document
Dim sect As Section
Dim note As Footnote
Set doc = ActiveDocument
For Each sect In doc.Sections
For Each note In sect.Range.Footnotes
If (note.Reference.Start >= sect.Range.Start And
note.Reference.End <= sect.Range.End) Then
Debug.Print note.Reference.Text & " " & note.Range.Text
End If
Next
Next
Using Word XP and Word 2003
document. Of course, just using Footnote.Index only gives you a numeric
index, and while you can query the FootnoteOptions to work out that the
format is say, lowercase letter, this doesn't help if the document editor
has chosen to restart the footnote numbering at some point. And
Reference.Text just returns an ASCII char 2.
The following code shows an example of collecting each footnote and its
reference. How do I collect the Reference's displayed text?
Dim doc As Document
Dim sect As Section
Dim note As Footnote
Set doc = ActiveDocument
For Each sect In doc.Sections
For Each note In sect.Range.Footnotes
If (note.Reference.Start >= sect.Range.Start And
note.Reference.End <= sect.Range.End) Then
Debug.Print note.Reference.Text & " " & note.Range.Text
End If
Next
Next
Using Word XP and Word 2003