BuiltInDocumentProperties Class

A collection of built-in document properties.

Inheritance Hierarchy

Namespace:  Aspose.Words.Properties
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.9.0

Syntax

public class BuiltInDocumentProperties : DocumentPropertyCollection

The BuiltInDocumentProperties type exposes the following members.

Properties

  NameDescription
Public propertyCode exampleAuthor
Gets or sets the name of the document's author.
Public propertyCode exampleBytes
Represents an estimate of the number of bytes in the document.
Public propertyCode exampleCategory
Gets or sets the category of the document.
Public propertyCode exampleCharacters
Represents an estimate of the number of characters in the document.
Public propertyCode exampleCharactersWithSpaces
Represents an estimate of the number of characters (including spaces) in the document.
Public propertyCode exampleComments
Gets or sets the document comments.
Public propertyCode exampleCompany
Gets or sets the company property.
Public propertyCode exampleContentStatus
Gets or sets the ContentStatus of the document.
Public propertyCode exampleContentType
Gets or sets the ContentStatus of the document.
Public propertyCode exampleCount
Gets number of items in the collection.
(Inherited from DocumentPropertyCollection.)
Public propertyCode exampleCreatedTime
Gets or sets date of the document creation in UTC.
Public propertyCode exampleHeadingPairs
Specifies document headings and their names.
Public propertyCode exampleHyperlinkBase
Specifies the base string used for evaluating relative hyperlinks in this document.
Public propertyCode exampleItemString
Returns a DocumentProperty object by the name of the property.
(Overrides DocumentPropertyCollectionItemString.)
Public propertyCode exampleItemInt32
Returns a DocumentProperty object by index.
(Inherited from DocumentPropertyCollection.)
Public propertyCode exampleKeywords
Gets or sets the document keywords.
Public propertyCode exampleLastPrinted
Gets or sets the date when the document was last printed in UTC.
Public propertyCode exampleLastSavedBy
Gets or sets the name of the last author.
Public propertyCode exampleLastSavedTime
Gets or sets the time of the last save in UTC.
Public propertyCode exampleLines
Represents an estimate of the number of lines in the document.
Public propertyCode exampleLinksUpToDate
Indicates whether hyperlinks in a document are up-to-date.
Public propertyCode exampleManager
Gets or sets the manager property.
Public propertyCode exampleNameOfApplication
Gets or sets the name of the application.
Public propertyCode examplePages
Represents an estimate of the number of pages in the document.
Public propertyCode exampleParagraphs
Represents an estimate of the number of paragraphs in the document.
Public propertyCode exampleRevisionNumber
Gets or sets the document revision number.
Public propertyCode exampleSecurity
Specifies the security level of a document as a numeric value.
Public propertyCode exampleSubject
Gets or sets the subject of the document.
Public propertyCode exampleTemplate
Gets or sets the informational name of the document template.
Public propertyCode exampleThumbnail

Gets or sets the thumbnail of the document.

Public propertyCode exampleTitle
Gets or sets the title of the document.
Public propertyCode exampleTitlesOfParts
Each string in the array specifies the name of a part in the document.
Public propertyCode exampleTotalEditingTime
Gets or sets the total editing time in minutes.
Public propertyCode exampleVersion
Represents the version number of the application that created the document.
Public propertyCode exampleWords
Represents an estimate of the number of words in the document.

Methods

  NameDescription
Public methodCode exampleClear
Removes all properties from the collection.
(Inherited from DocumentPropertyCollection.)
Public methodCode exampleContains
Returns true if a property with the specified name exists in the collection.
(Inherited from DocumentPropertyCollection.)
Public methodEquals (Inherited from Object.)
Public methodCode exampleGetEnumerator
Returns an enumerator object that can be used to iterate over all items in the collection.
(Inherited from DocumentPropertyCollection.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodCode exampleIndexOf
Gets the index of a property by name.
(Inherited from DocumentPropertyCollection.)
Public methodCode exampleRemove
Removes a property with the specified name from the collection.
(Inherited from DocumentPropertyCollection.)
Public methodCode exampleRemoveAt
Removes a property at the specified index.
(Inherited from DocumentPropertyCollection.)
Public methodToString (Inherited from Object.)

Remarks

Provides access to DocumentProperty objects by their names (using an indexer) and via a set of typed properties that return values of appropriate types.

Remarks

The names of the properties are case-insensitive.

The properties in the collection are sorted alphabetically by name.

Examples

Shows how to work with built in document properties.
Document doc = new Document(MyDir + "Properties.docx");

// Some information about the document is stored in member attributes, and can be accessed like this
Console.WriteLine($"Document filename:\n\t \"{doc.OriginalFileName}\"");

// Most of the document's metadata, such as author name, file size,
// word/page counts can be found in the built-in properties collection like this
Console.WriteLine("Built-in Properties:");
foreach (DocumentProperty docProperty in doc.BuiltInDocumentProperties)
{
    Console.WriteLine(docProperty.Name);
    Console.WriteLine($"\tType:\t{docProperty.Type}");

    // Some properties may store multiple values
    if (docProperty.Value is Array)
    {
        foreach (object value in docProperty.Value as Array)
            Console.WriteLine($"\tValue:\t\"{value}\"");
    }
    else
    {
        Console.WriteLine($"\tValue:\t\"{docProperty.Value}\"");
    }
}

See Also