What is the method for deleting a comment?

J

John Wirt

Is there a method for deleting all comments on the text
included in a table cell?

The cell can be selected and set as a Range if this helps.

John Wirt
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < John Wirt > écrivait :
In this message, < John Wirt > wrote:

|| Is there a method for deleting all comments on the text
|| included in a table cell?
||
|| The cell can be selected and set as a Range if this helps.
||

Try playing around with this to get you going:

'_______________________________________
Dim MyPara As Range

Set MyPara = Selection.Paragraphs(1).Range
'Set MyPara = Selection.Tables(1).Cell(1, 1).Range

With MyPara
With .Comments
If .Count > 0 Then
Do While .Count <> 0
.Item(1).Delete
Loop
End If
End With
End With
'_______________________________________

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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