BuiltInDocumentPropertiesKeywords Property |
Gets or sets the document keywords.
Syntax
public string Keywords { get; set; }
Public Property Keywords As String
Get
Set
public:
property String^ Keywords {
String^ get ();
void set (String^ value);
}
member Keywords : string with get, set
Property Value
Type:
String
Examples
Shows how to work with built-in document properties in the "Description" category.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
BuiltInDocumentProperties properties = doc.BuiltInDocumentProperties;
properties.Author = "John Doe";
builder.Write("Author:\t");
builder.InsertField(FieldType.FieldAuthor, true);
properties.Title = "John's Document";
builder.Write("\nDoc title:\t");
builder.InsertField(FieldType.FieldTitle, true);
properties.Subject = "My subject";
builder.Write("\nSubject:\t");
builder.InsertField(FieldType.FieldSubject, true);
properties.Comments = $"This is {properties.Author}'s document about {properties.Subject}";
builder.Write("\nComments:\t\"");
builder.InsertField(FieldType.FieldComments, true);
builder.Write("\"");
properties.Category = "My category";
properties.Keywords = "Tag 1; Tag 2; Tag 3";
doc.Save(ArtifactsDir + "DocumentProperties.Description.docx");
See Also