Can I convert comments to footnotes?

A

Avrilp

someone typed my document but inserted numbered comments instead of numbered
footnotes. Is there a way to convert the comments to footnotes, without
deleting each and re-inserting footnotes one by one?
Using Word 2000
 
K

Klaus Linke

Hi Avril,

You can, with a macro:

Sub Comments2Footnotes()
Dim myComment As Comment
Dim i
For i = ActiveDocument.Comments.Count To 1 Step -1
Set myComment = ActiveDocument.Comments(i)
myComment.Range.Copy
myComment.Reference.Select
myComment.Delete
ActiveDocument.Footnotes.Add Selection.Range
Selection.Footnotes(1).Range.Paste
Next i
End Sub

If you need help running the macro, see
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

In case the numbering of the comments was applied with auto-numbering,
those numbers should disappear (since the unnumbered "footnote text" style
should be applied to the footnotes automatically).

If they have been typed, you could probably get rid of them with a wildcard
search:
In Edit > Replace, check "Match wildcards. Then:
Find what: (^2 )[0-9\).]@[^32^s^t]@
Replace with: \1
^2 is the code of a footnote reference (... ^f doesn't work in wildcard
searches).
You want to keep the footnote reference and the trailing blank, so you put
it in (braces), and re-use this (1st) expression in "Replace with", using
"\1".
The rest of the search expression matches any number of digits, possibly
dots or braces (as in "12." or "7)"), followed by whitespace (^32 = space,
^s = non-breaking space, ^t = tabstop).

Regards,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top