Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: Visual Studio
Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
Use the DeleteAllComments
method to remove all comments from a Microsoft Office Word document.
Applies to: The information in this topic applies to document-level projects and VSTO Add-in projects for Word. For more information, see Features available by Office application and project type.
Call the DeleteAllComments method of the
ThisDocument
class in your project. To use this code example, run it from theThisDocument
class.Me.DeleteAllComments()
this.DeleteAllComments();
Call the DeleteAllComments method of the Document from which you want to remove comments.
The following code example removes all comments from the active document. To use this code example, run it from the
ThisAddIn
class in your project.Me.Application.ActiveDocument.DeleteAllComments()
this.Application.ActiveDocument.DeleteAllComments();