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.

Posted By: hardwork23 on July 10, 2018

Now you can smoothly delete browsing history of internet explorer as here we are going to share one of the best guidelines in delete your browser history this portal so for more queries you may switch to this hub and can have all useful information to you.

Posted By: Cosheen on August 1, 2018

I think you need to ask this resource for your homework. They would done it in a few hours.

Posted By: johnbillhammer21 on August 30, 2018

By such contents, people can definitely increase their knowledge. How perfectly a person can compile all the excellence in one blog is absolutely amazing. Already bookmarked this website so that I can keep a regular check. Keep on sharing more. How To Extra Money

Posted By: williamlucas on August 30, 2018

Thank you for sharing the code and it runs smoothly as i have tested it on of documents. Essay Help

You need to login to post a comment.