Aspose::Words::Properties::BuiltInDocumentProperties class

BuiltInDocumentProperties class

A collection of built-in document properties. To learn more, visit the Work with Document Properties documentation article.

class BuiltInDocumentProperties : public DocumentPropertyCollection

Methods

MethodDescription
get_Author()Gets or sets the name of the document’s author.
get_Bytes()Represents an estimate of the number of bytes in the document.
get_Category()Gets or sets the category of the document.
get_Characters()Represents an estimate of the number of characters in the document.
get_CharactersWithSpaces()Represents an estimate of the number of characters (including spaces) in the document.
get_Comments()Gets or sets the document comments.
get_Company()Gets or sets the company property.
get_ContentStatus()Gets the content status of the document.
get_ContentType()Gets the content type of the document.
get_CreatedTime()Gets or sets date of the document creation in UTC.
get_HeadingPairs()Specifies document headings and their names.
get_HyperlinkBase()Specifies the base string used for evaluating relative hyperlinks in this document.
get_HyperlinksChanged()Indicates whether hyperlinks in a document were changed.
get_Keywords()Gets or sets the document keywords.
get_LastPrinted()Gets or sets the date when the document was last printed in UTC.
get_LastSavedBy()Gets or sets the name of the last author.
get_LastSavedTime()Gets or sets the time of the last save in UTC.
get_Lines()Represents an estimate of the number of lines in the document.
get_LinksUpToDate()Indicates whether hyperlinks in a document are up-to-date.
get_Manager()Gets or sets the manager property.
get_NameOfApplication()Gets or sets the name of the application.
get_Pages()Represents an estimate of the number of pages in the document.
get_Paragraphs()Represents an estimate of the number of paragraphs in the document.
get_RevisionNumber()Gets or sets the document revision number.
get_ScaleCrop()Indicates whether document thumbnail is cropped or scaled to fit the display.
get_Security()Specifies the security level of a document as a numeric value.
get_SharedDocument()Indicates whether the document is a shared document.
get_Subject()Gets or sets the subject of the document.
get_Template()Gets or sets the informational name of the document template.
get_Thumbnail()Gets or sets the thumbnail of the document.
get_Title()Gets or sets the title of the document.
get_TitlesOfParts()Each string in the array specifies the name of a part in the document.
get_TotalEditingTime()Gets or sets the total editing time in minutes.
get_Version()Represents the version number of the application that created the document.
get_Words()Represents an estimate of the number of words in the document.
idx_get(System::String) overrideReturns a DocumentProperty object by the name of the property.
set_Author(const System::String &)Sets the name of the document’s author.
set_Bytes(int32_t)Represents an estimate of the number of bytes in the document.
set_Category(const System::String &)Sets the category of the document.
set_Characters(int32_t)Represents an estimate of the number of characters in the document.
set_CharactersWithSpaces(int32_t)Represents an estimate of the number of characters (including spaces) in the document.
set_Comments(const System::String &)Sets the document comments.
set_Company(const System::String &)Sets the company property.
set_ContentStatus(const System::String &)Sets the content status of the document.
set_ContentType(const System::String &)Sets the content type of the document.
set_CreatedTime(System::DateTime)Sets date of the document creation in UTC.
set_HeadingPairs(const System::ArrayPtr<System::SharedPtr<System::Object>> &)Specifies document headings and their names.
set_HyperlinkBase(const System::String &)Specifies the base string used for evaluating relative hyperlinks in this document.
set_Keywords(const System::String &)Sets the document keywords.
set_LastPrinted(System::DateTime)Sets the date when the document was last printed in UTC.
set_LastSavedBy(const System::String &)Sets the name of the last author.
set_LastSavedTime(System::DateTime)Sets the time of the last save in UTC.
set_Lines(int32_t)Represents an estimate of the number of lines in the document.
set_LinksUpToDate(bool)Indicates whether hyperlinks in a document are up-to-date.
set_Manager(const System::String &)Sets the manager property.
set_NameOfApplication(const System::String &)Sets the name of the application.
set_Pages(int32_t)Represents an estimate of the number of pages in the document.
set_Paragraphs(int32_t)Represents an estimate of the number of paragraphs in the document.
set_RevisionNumber(int32_t)Sets the document revision number.
set_Security(Aspose::Words::Properties::DocumentSecurity)Specifies the security level of a document as a numeric value.
set_Subject(const System::String &)Sets the subject of the document.
set_Template(const System::String &)Sets the informational name of the document template.
set_Thumbnail(const System::ArrayPtr<uint8_t> &)Sets the thumbnail of the document.
set_Title(const System::String &)Sets the title of the document.
set_TitlesOfParts(const System::ArrayPtr<System::String> &)Each string in the array specifies the name of a part in the document.
set_TotalEditingTime(int32_t)Sets the total editing time in minutes.
set_Version(int32_t)Represents the version number of the application that created the document.
set_Words(int32_t)Represents an estimate of the number of words in the document.
Clear()Removes all properties from the collection.
Contains(const System::String &)Returns true if a property with the specified name exists in the collection.
GetEnumerator() overrideReturns an enumerator object that can be used to iterate over all items in the collection.
IndexOf(const System::String &)Gets the index of a property by name.
Remove(const System::String &)Removes a property with the specified name from the collection.
RemoveAt(int32_t)Removes a property at the specified index.
get_Count()Gets number of items in the collection.
virtual idx_get(System::String)Returns a DocumentProperty object by the name of the property.
idx_get(int32_t)Returns a DocumentProperty object by index.

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.

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.

auto doc = System::MakeObject<Aspose::Words::Document>(System::String(get_MyDir() + u"Properties.docx"));

// The "Document" object contains some of its metadata in its members.
std::cout << System::String::Format(u"Document filename:\n\t \"{0}\"", doc->get_OriginalFileName()) << std::endl;

// The document also stores metadata in its built-in properties.
// Each built-in property is a member of the document's "BuiltInDocumentProperties" object.
std::cout << "Built-in Properties:" << std::endl;
for (auto&& docProperty : System::IterateOver(doc->get_BuiltInDocumentProperties()))
{
    std::cout << docProperty->get_Name() << std::endl;
    std::cout << System::String::Format(u"\tType:\t{0}", docProperty->get_Type()) << std::endl;

    // Some properties may store multiple values.
    if (System::ObjectExt::Is<System::Collections::Generic::ICollection<System::SharedPtr<System::Object>>>(docProperty->get_Value()))
    {
        for (auto&& value : System::IterateOver(System::AsCast<System::Collections::Generic::ICollection<System::SharedPtr<System::Object>>>(docProperty->get_Value())))
        {
            std::cout << System::String::Format(u"\tValue:\t\"{0}\"", value) << std::endl;
        }
    }
    else
    {
        std::cout << System::String::Format(u"\tValue:\t\"{0}\"", docProperty->get_Value()) << std::endl;
    }
}

See Also