View Single Post
 
Old 11-17-2014, 05:15 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I can't see the point of bookmarking all the footnotes, since Word creates its own when you insert cross-references to them, which you ordinarily do via a NOTEREF field.

A macro to do what you're after using Word's own footnote referencing is:
Code:
Sub ActivateFootNoteCrossRefs()
Dim SBar As Boolean
Dim TrkStatus As Boolean
Dim Rng As Range, i As Long, StrNt As String
' Store current Status Bar status, then switch on
SBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
' Store current Track Changes status, then switch off
With ActiveDocument
  TrkStatus = .TrackRevisions
  .TrackRevisions = False
End With
' Turn Off Screen Updating
Application.ScreenUpdating = False
With ActiveDocument
  ' Process all footnotes
  For i = 1 To .Footnotes.Count
    ' Update the statusbar
    StatusBar = "Processing Footnote " & i
    Set Rng = .Footnotes(i).Range
    With .Footnotes(i).Range
      With .Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = "see n [0-9]{1,}"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindStop
        .Format = False
        .MatchWildcards = True
        .Execute
      End With
      Do While .Find.Found
        If .Duplicate.InRange(Rng) Then
          StrNt = Split(.Duplicate.Text, " ")(2)
          ' To replace the "see n " text as well as the number with
          ' a formatted footnote reference, delete/comment-out the next
          ' line and change wdFootnoteNumber to wdFootnoteNumberFormatted 
          .Start = .Words(3).Start
          .InsertCrossReference ReferenceType:=wdRefTypeFootnote, _
            ReferenceKind:=wdFootnoteNumber, ReferenceItem:=StrNt
          .Collapse wdCollapseEnd
          .Find.Execute
        Else
          Exit Do
        End If
      Loop
    End With
  Next
  ' Update the statusbar
  StatusBar = "Finished Processing " & .Footnotes.Count & " Footnotes"
End With
Set Rng = Nothing
' Restore original Status Bar status
Application.DisplayStatusBar = SBar
' Restore original Track Changes status
ActiveDocument.TrackRevisions = TrkStatus
' Restore Screen Updating
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote