Created
August 10, 2022 12:25
-
-
Save conholdate-docs-gists/f00c0d1b85ac41622421ad1b083dab07 to your computer and use it in GitHub Desktop.
Search metadata properties of a document | https://docs.conholdate.com/net/search-metadata-properties/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Constants.InputPptx is an absolute or relative path to your document. Ex: @"C:\Docs\source.pptx" | |
using (Metadata metadata = new Metadata(Constants.InputPptx)) | |
{ | |
// Fetch all the properties satisfying the predicate: | |
// property contains the name of the last document editor OR the date/time the document was last modified | |
var properties = metadata.FindProperties(p => p.Tags.Contains(Tags.Person.Editor) || p.Tags.Contains(Tags.Time.Modified)); | |
foreach (var property in properties) | |
{ | |
Console.WriteLine("Property name: {0}, Property value: {1}", property.Name, property.Value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read the complete article: https://docs.conholdate.com/net/search-metadata-properties/