Delete all comments after cursor position

C

Charlie Mac

I need to position the cursor in a document and run a macro to delete
all comments below the cursor (in the rest of the document). Thanks.
 
P

Perry

Try something like:

Dim r As Range
With ActiveDocument
Set r = .Range(Selection.Range.End, .Content.End)
End With
For x = r.Comments.Count To 1 Step -1
r.Comments(x).Delete
Next
 
C

Charlie Mac

Perry,

Thank you for your response. Your code solved my problem.

Take care,

Charlie of Texas
 

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