Posted By

muhammadsabir on 06/13/16


Tagged

doc comments metadata DOCX


Versions (?)

Remove Comments from a Word document


 / Published in: C#
 

URL: https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET/blob/master/Examples/GroupDocs.Metadata.Examples.CSharp/Documents.cs#L313

This code snippet removes any comments from a word document. The comments can be something like this screenshot

  1. /// <summary>
  2. /// Removes document comments of Doc file
  3. /// </summary>
  4. public static void RemoveComments()
  5. {
  6. try
  7. {
  8.  
  9. // initialize DocFormat
  10. DocFormat docFormat = new DocFormat(Common.MapSourceFilePath(filePath));
  11.  
  12. // remove comments
  13. docFormat.ClearComments();
  14.  
  15. // save file in destination folder
  16. docFormat.Save(Common.MapDestinationFilePath(filePath));
  17.  
  18. Console.WriteLine("File saved in destination folder.");
  19.  
  20.  
  21. }
  22. catch (Exception exp)
  23. {
  24. Console.WriteLine(exp.Message);
  25. }
  26. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: EstelJordan on March 14, 2018

Oh, thank you, in my current project at essay writing service I will probably need this part.

Posted By: MattieOdll on May 26, 2018

This information is very useful, thank you! I usually edit my AnswerShark assignments using Word documents and this code snippet may come in handy. By the way, here is one of reflective essay outline that could be helpful for college students

Posted By: MattieOdll on May 26, 2018

This information is very useful, thank you! I usually edit my AnswerShark assignments using Word documents and this code snippet may come in handy. By the way, here is one of reflective essay outline that could be helpful for college students

Posted By: MattieOdll on May 26, 2018

This information is very useful, thank you! I usually edit my AnswerShark assignments using Word documents and this code snippet may come in handy. By the way, here is one of reflective essay outline that could be helpful for college students

Posted By: katyciarawriter on June 9, 2018

A dissertation needs to have a few particular elements, those 1st continuously An articulation or inquiry that might best be approved alternately replied Eventually Tom's perusing new research. The second component will be those Examine itself. The configuration of the study need to a chance to be Online dissertations help, the information need to a chance to be exact a gathered clinched alongside An reliable way, and the conclusions that need aid settled on from it must be scientifically substantial.

You need to login to post a comment.