View Single Post
  #2   Report Post  
Klaus Linke
 
Posts: n/a
Default

"*(((({" schrieb im Newsbeitrag ...
I've got a long document with a bazillion footnotes. I'd like to
convert them to hard-coded text. How do I do that?

*(((({



Hi *(((({

Below's the macro I have been using...
Maybe you can improve on it a bit, or adapt it to your needs.

Greetings,
Klaus



Sub footnotestrip()
Dim afootnote As Footnote
Dim NumberOfFootnotes As Integer
Dim i As Integer
Dim aFootnoteReference As String
Dim aFootnoteRefTag As String
NumberOfFootnotes = ActiveDocument.Footnotes.Count
For i = NumberOfFootnotes To 1 Step -1
Set afootnote = ActiveDocument.Footnotes(i)
afootnote.Range.Select
Selection.MoveStartWhile Cset:=" " & Chr(9)
Selection.Cut
aFootnoteReference = afootnote.Reference.Text
Select Case aFootnoteReference
Case Chr(2)
aFootnoteRefTag = "FNZ"
Case "*"
aFootnoteRefTag = "FNS"
Case Else
aFootnoteRefTag = "FNRef" _
& aFootnoteReference & "/FNRef"
End Select
afootnote.Reference.Select
If afootnote.Reference.Text = Chr(40) Then
With Dialogs(wdDialogInsertSymbol)
aFootnoteRefTag = _
"FNSym," & .Font & "," _
& .CharNum & ""
End With
End If
afootnote.Delete
Selection.InsertBefore "FN" _
& aFootnoteRefTag
Selection.Collapse (wdCollapseEnd)
Selection.Paste
Selection.InsertAfter "/FN"
Next i
End Sub