Word Footnote Macro

It has always been a problem to import Microsoft Word documents with footnotes into QuarkXPress, as footnote references are often truncated or omitted altogether both in the body text and in front of the notes. The following Microsoft Visual Basic macro can solve this problem: it converts footnote reference numbers in the body text to plain numbers in superscript, and copies the footnotes to the end of the document with their number appended in front of them with "##" included as a separator. Then, it asks the user whether to delete all the footnotes.
If MsgBox("Make sure last paragraph is Normal", vbOKCancel) = vbCancel Then End

' inserting plain text reference numbers 
' and copying footnotes to the end of the document

For i = 1 To ActiveDocument.Footnotes.Count
  x$ = Format(ActiveDocument.Footnotes.Item(i).Index)

  ActiveDocument.Footnotes.Item(i).Range.InsertBefore Text:=(x$ + "##")
  ActiveDocument.Footnotes.Item(i).Range.Copy
  s = ActiveDocument.Range.End
  Selection.SetRange Start:=s, End:=s
  Selection.TypeParagraph
  Selection.PasteAndFormat Type:=wdFormatOriginalFormatting

  s = ActiveDocument.Footnotes.Item(i).Reference.Start
  Selection.SetRange Start:=s, End:=s
  Selection.Font.Superscript = True
  Selection.TypeText Text:=x$
Next

' deleting the footnotes

If MsgBox("Conversion done. Delete footnotes?", vbOKCancel) = vbOK Then
  For i = 1 To ActiveDocument.Footnotes.Count
    ActiveDocument.Footnotes.Item(1).Delete
  Next
End If
To install the macro, in Word, go to Tools -- Macro -- Macros..., type in an appropriate name for the new macro, click Create, and paste the above text between the Sub and End Sub tags. To run the macro, select Tools -- Macro -- Macros..., select the macro just created, and click Run, or create a keyboard shortcut. Make sure that the cursor is in the body text and not in the footnotes, and that the last paragraph in the document is formatted with the Normal style.

ALL SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.