Peter Dongan
Peter Dongan

Reputation: 2308

Can you programmatically determine if modern comments are enabled in Word?

Can you programmatically determine if modern comments are enabled in Word?

If it is not possible to check this directly [I don't think it is], is there any property of a comment that you can check that will indicate whether it was added or edited using modern comments? It would need to include comments that were originally added in the old style, but then edited using modern comments.

Upvotes: 2

Views: 117

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49455

Try to use the Counts property of the Comments collection:

ActiveDocument.Comments.Count

Use the Comment.Range property which returns a Range object that represents the contents of a comment. For example:

With ActiveDocument.Comments(1).Range 
 .Delete 
 .InsertBefore "new comment text" 
End With

See Redesigned Word Comments VBA deprecation announcement for more information.

Upvotes: 1

Related Questions