GroupDocsGists
10/19/2017 - 11:34 AM

GetComments.cs

//For complete examples and data files, please go to https://github.com/groupdocsmetadata/GroupDocs_Metadata_NET
// initialize DocFormat
DocFormat docFormat = new DocFormat(Common.MapSourceFilePath(filePath));

//get comments...
DocComment[] comments = docFormat.ExtractComments();

//get commnets by author...
//DocComment[] comments = docFormat.ExtractComments("USMAN");

// display comments
foreach (DocComment comment in comments)
{
      Console.WriteLine("Author: ", comment.Author);
      Console.WriteLine("Created on Date: ", comment.CreatedDate);
      Console.WriteLine("Initials: ", comment.Initials);
      Console.WriteLine("\n");
}