How to convert comments to endnotes?

L

luhmann

I'd like to create a macro that will convert all the comments in a
word document to endnotes. (I am doing this in order to be able to
read it in an application that can convert endnotes from word RTF
files, but not comments.) Does anyone know how I would go about
writing such a macro?

Thanks for your help!!!
 
D

Doug Robbins - Word MVP

Use the following code:

Dim acomment As Comment, vcomment As String
For Each acomment In ActiveDocument.Comments
vcomment = acomment.Range.Text
acomment.Reference.Select
Selection.Endnotes.Add Range:=Selection.Range, Text:=vcomment
acomment.Delete
Next acomment


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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