英文:
Can you programmatically determine if modern comments are enabled in Word?
问题
你能够以编程方式确定 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.
答案1
得分: 1
尝试使用 Comments
集合的 Counts
属性:
ActiveDocument.Comments.Count
使用 Comment.Range 属性,该属性返回一个表示评论内容的 Range
对象。例如:
With ActiveDocument.Comments(1).Range
.Delete
.InsertBefore "新评论文本"
End With
查看更多信息,请参阅重新设计的 Word 评论 VBA 弃用公告。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论