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
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top