' For complete examples and data files, please go to https://github.com/groupdocsmetadata/GroupDocs_Metadata_NET
' initialize DocFormat
Dim docFormat As New DocFormat(Common.MapSourceFilePath(filePath))
' inspect document
Dim inspectionResult As InspectionResult = docFormat.InspectDocument()
' display comments
If inspectionResult.Comments.Length > 0 Then
Console.WriteLine("Comments in document:")
For Each comment As DocComment In inspectionResult.Comments
Console.WriteLine("Comment: {0}", comment.Text)
Console.WriteLine("Author: {0}", comment.Author)
Console.WriteLine("Date: {0}", comment.CreatedDate)
Next
End If
' display merge fields
If inspectionResult.Fields.Length > 0 Then
Console.WriteLine(vbLf & "Merge Fields in document:")
For Each field As DocField In inspectionResult.Fields
Console.WriteLine(field.Name)
Next
End If
' display hidden fields
If inspectionResult.HiddenText.Length > 0 Then
Console.WriteLine(vbLf & "Hiddent text in document:")
For Each word As String In inspectionResult.HiddenText
Console.WriteLine(word)
Next
End If