// 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));
// inspect document
InspectionResult inspectionResult = docFormat.InspectDocument();
// if merge fields are presented
if (inspectionResult.Fields.Length > 0)
{
// remove it
docFormat.RemoveHiddenData(new DocInspectionOptions(DocInspectorOptionsEnum.Fields));
// save file in destination folder
docFormat.Save(Common.MapDestinationFilePath(filePath));
}