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 Aspose::Words::Properties::DocumentPropertyCollection

Methods

MethodDescription
Clear()Removes all properties from the collection.
Contains(const System::String&)Returns true if a property with the specified name exists in the collection.
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 or sets the ContentStatus of the document.
get_ContentType()Gets or sets the ContentType of the document.
get_Count()Gets number of items in the collection.
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_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_Security()Specifies the security level of a document as a numeric value.
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.
GetEnumerator() overrideReturns an enumerator object that can be used to iterate over all items in the collection.
GetType() const override
idx_get(System::String) overrideReturns a DocumentProperty object by the name of the property.
idx_get(int32_t)Returns a DocumentProperty object by index.
IndexOf(const System::String&)Gets the index of a property by name.
Is(const System::TypeInfo&) const override
Remove(const System::String&)Removes a property with the specified name from the collection.
RemoveAt(int32_t)Removes a property at the specified index.
set_Author(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Author.
set_Bytes(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Bytes.
set_Category(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Category.
set_Characters(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Characters.
set_CharactersWithSpaces(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_CharactersWithSpaces.
set_Comments(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Comments.
set_Company(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Company.
set_ContentStatus(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_ContentStatus.
set_ContentType(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_ContentType.
set_CreatedTime(System::DateTime)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_CreatedTime.
set_HeadingPairs(const System::ArrayPtr<System::SharedPtr<System::Object>>&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_HeadingPairs.
set_HyperlinkBase(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_HyperlinkBase.
set_Keywords(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Keywords.
set_LastPrinted(System::DateTime)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_LastPrinted.
set_LastSavedBy(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_LastSavedBy.
set_LastSavedTime(System::DateTime)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_LastSavedTime.
set_Lines(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Lines.
set_LinksUpToDate(bool)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_LinksUpToDate.
set_Manager(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Manager.
set_NameOfApplication(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_NameOfApplication.
set_Pages(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Pages.
set_Paragraphs(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Paragraphs.
set_RevisionNumber(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_RevisionNumber.
set_Security(Aspose::Words::Properties::DocumentSecurity)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Security.
set_Subject(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Subject.
set_Template(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Template.
set_Thumbnail(const System::ArrayPtr<uint8_t>&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Thumbnail.
set_Title(const System::String&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Title.
set_TitlesOfParts(const System::ArrayPtr<System::String>&)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_TitlesOfParts.
set_TotalEditingTime(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_TotalEditingTime.
set_Version(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Version.
set_Words(int32_t)Setter for Aspose::Words::Properties::BuiltInDocumentProperties::get_Words.
static Type()

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 = MakeObject<Document>(MyDir + u"Properties.docx");

// The "Document" object contains some of its metadata in its members.
std::cout << "Document filename:\n\t \"" << 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 (const auto& docProperty : System::IterateOver(doc->get_BuiltInDocumentProperties()))
{
    std::cout << docProperty->get_Name() << std::endl;
    std::cout << 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<SharedPtr<System::Object>>>(docProperty->get_Value()))
    {
        for (const auto& value : System::IterateOver(
                 System::AsCast<System::Collections::Generic::ICollection<SharedPtr<System::Object>>>(docProperty->get_Value())))
        {
            std::cout << "\tValue:\t\"" << value << "\"" << std::endl;
        }
    }
    else
    {
        std::cout << "\tValue:\t\"" << docProperty->get_Value() << "\"" << std::endl;
    }
}

See Also