Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0)
How to: Remove All Comments from Documents
Applies to |
|---|
The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office. Project type Microsoft Office version For more information, see Features Available by Application and Project Type. |
Use the DeleteAllComments method to remove all comments from a Microsoft Office Word document.
To remove all comments from a document that is part of a document-level customization
To remove all comments from a document by using an application-level add-in
Call the DeleteAllComments method of the Microsoft.Office.Interop.Word..::.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();
Tasks
Concepts