Aspose::Words::Properties::BuiltInDocumentProperties Class Reference

Detailed Description

A collection of built-in document properties.

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.

See also
Aspose::Words::Document
Aspose::Words::Document::get_BuiltInDocumentProperties
Aspose::Words::Document::get_CustomDocumentProperties
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 (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 (auto value : System::IterateOver(
System::DynamicCast_noexcept<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;
}
}

#include <Aspose.Words.Cpp/Properties/BuiltInDocumentProperties.h>

+ Inheritance diagram for Aspose::Words::Properties::BuiltInDocumentProperties:

Public Member Functions

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

Static Public Member Functions

static const TypeInfoType ()
 
- Static Public Member Functions inherited from DocumentPropertyCollection
static const TypeInfoType ()
 

Member Function Documentation

◆ get_Author()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_Author ( )

Gets or sets the name of the document's author.

Examples

Shows how to work with built-in document properties in the "Description" category.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// Below are four built-in document properties that have fields that can display their values in the document body.
// 1 - "Author" property, which we can display using an AUTHOR field:
properties->set_Author(u"John Doe");
builder->Write(u"Author:\t");
builder->InsertField(FieldType::FieldAuthor, true);
// 2 - "Title" property, which we can display using a TITLE field:
properties->set_Title(u"John's Document");
builder->Write(u"\nDoc title:\t");
builder->InsertField(FieldType::FieldTitle, true);
// 3 - "Subject" property, which we can display using a SUBJECT field:
properties->set_Subject(u"My subject");
builder->Write(u"\nSubject:\t");
builder->InsertField(FieldType::FieldSubject, true);
// 4 - "Comments" property, which we can display using a COMMENTS field:
properties->set_Comments(String::Format(u"This is {0}'s document about {1}", properties->get_Author(), properties->get_Subject()));
builder->Write(u"\nComments:\t\"");
builder->InsertField(FieldType::FieldComments, true);
builder->Write(u"\"");
// The "Category" built-in property does not have a field that can display its value.
properties->set_Category(u"My category");
// We can set multiple keywords for a document by separating the string value of the "Keywords" property with semicolons.
properties->set_Keywords(u"Tag 1; Tag 2; Tag 3");
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details".
// The "Author" built-in property is in the "Origin" group, and the others are in the "Description" group.
doc->Save(ArtifactsDir + u"DocumentProperties.Description.docx");

◆ get_Bytes()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_Bytes ( )

Represents an estimate of the number of bytes in the document.

Microsoft Word does not always set this property.

Aspose.Words does not update this property.

Examples

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ get_Category()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_Category ( )

Gets or sets the category of the document.

Examples

Shows how to work with built-in document properties in the "Description" category.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// Below are four built-in document properties that have fields that can display their values in the document body.
// 1 - "Author" property, which we can display using an AUTHOR field:
properties->set_Author(u"John Doe");
builder->Write(u"Author:\t");
builder->InsertField(FieldType::FieldAuthor, true);
// 2 - "Title" property, which we can display using a TITLE field:
properties->set_Title(u"John's Document");
builder->Write(u"\nDoc title:\t");
builder->InsertField(FieldType::FieldTitle, true);
// 3 - "Subject" property, which we can display using a SUBJECT field:
properties->set_Subject(u"My subject");
builder->Write(u"\nSubject:\t");
builder->InsertField(FieldType::FieldSubject, true);
// 4 - "Comments" property, which we can display using a COMMENTS field:
properties->set_Comments(String::Format(u"This is {0}'s document about {1}", properties->get_Author(), properties->get_Subject()));
builder->Write(u"\nComments:\t\"");
builder->InsertField(FieldType::FieldComments, true);
builder->Write(u"\"");
// The "Category" built-in property does not have a field that can display its value.
properties->set_Category(u"My category");
// We can set multiple keywords for a document by separating the string value of the "Keywords" property with semicolons.
properties->set_Keywords(u"Tag 1; Tag 2; Tag 3");
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details".
// The "Author" built-in property is in the "Origin" group, and the others are in the "Description" group.
doc->Save(ArtifactsDir + u"DocumentProperties.Description.docx");

◆ get_Characters()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_Characters ( )

Represents an estimate of the number of characters in the document.

Aspose.Words updates this property when you call UpdateWordCount.

Examples

Shows how to update all list labels in a document.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Writeln(String(u"Lorem ipsum dolor sit amet, consectetur adipiscing elit, ") +
u"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
builder->Write(String(u"Ut enim ad minim veniam, ") + u"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.");
// Aspose.Words does not track document metrics like these in real time.
ASSERT_EQ(0, doc->get_BuiltInDocumentProperties()->get_Characters());
ASSERT_EQ(0, doc->get_BuiltInDocumentProperties()->get_Words());
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Paragraphs());
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Lines());
// To get accurate values for three of these properties, we will need to update them manually.
doc->UpdateWordCount();
ASSERT_EQ(196, doc->get_BuiltInDocumentProperties()->get_Characters());
ASSERT_EQ(36, doc->get_BuiltInDocumentProperties()->get_Words());
ASSERT_EQ(2, doc->get_BuiltInDocumentProperties()->get_Paragraphs());
// For the line count, we will need to call a specific overload of the updating method.
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Lines());
doc->UpdateWordCount(true);
ASSERT_EQ(4, doc->get_BuiltInDocumentProperties()->get_Lines());

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ get_CharactersWithSpaces()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_CharactersWithSpaces ( )

Represents an estimate of the number of characters (including spaces) in the document.

Aspose.Words updates this property when you call UpdateWordCount.

Examples

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ get_Comments()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_Comments ( )

Gets or sets the document comments.

Examples

Shows how to work with built-in document properties in the "Description" category.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// Below are four built-in document properties that have fields that can display their values in the document body.
// 1 - "Author" property, which we can display using an AUTHOR field:
properties->set_Author(u"John Doe");
builder->Write(u"Author:\t");
builder->InsertField(FieldType::FieldAuthor, true);
// 2 - "Title" property, which we can display using a TITLE field:
properties->set_Title(u"John's Document");
builder->Write(u"\nDoc title:\t");
builder->InsertField(FieldType::FieldTitle, true);
// 3 - "Subject" property, which we can display using a SUBJECT field:
properties->set_Subject(u"My subject");
builder->Write(u"\nSubject:\t");
builder->InsertField(FieldType::FieldSubject, true);
// 4 - "Comments" property, which we can display using a COMMENTS field:
properties->set_Comments(String::Format(u"This is {0}'s document about {1}", properties->get_Author(), properties->get_Subject()));
builder->Write(u"\nComments:\t\"");
builder->InsertField(FieldType::FieldComments, true);
builder->Write(u"\"");
// The "Category" built-in property does not have a field that can display its value.
properties->set_Category(u"My category");
// We can set multiple keywords for a document by separating the string value of the "Keywords" property with semicolons.
properties->set_Keywords(u"Tag 1; Tag 2; Tag 3");
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details".
// The "Author" built-in property is in the "Origin" group, and the others are in the "Description" group.
doc->Save(ArtifactsDir + u"DocumentProperties.Description.docx");

◆ get_Company()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_Company ( )

Gets or sets the company property.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

◆ get_ContentStatus()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_ContentStatus ( )

Gets or sets the ContentStatus of the document.

Examples

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ get_ContentType()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_ContentType ( )

Gets or sets the ContentStatus of the document.

Examples

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ get_CreatedTime()

System::DateTime Aspose::Words::Properties::BuiltInDocumentProperties::get_CreatedTime ( )

Gets or sets date of the document creation in UTC.

For documents originated from RTF format this property returns local time of the author's machine at the moment of document creation.

Aspose.Words does not update this property.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

◆ get_HeadingPairs()

System::ArrayPtr<System::SharedPtr<System::Object> > Aspose::Words::Properties::BuiltInDocumentProperties::get_HeadingPairs ( )

Specifies document headings and their names.

Every heading pair occupies two elements in this array.

The first element of the pair is a String and specifies the heading name. The second element of the pair is an Int32 and specifies the count of document parts for this heading in the TitlesOfParts property.

The total sum of counts for all heading pairs in this property must be equal to the number of elements in the TitlesOfParts property.

Aspose.Words does not update this property.

See also
Aspose::Words::Properties::BuiltInDocumentProperties::get_TitlesOfParts
Examples

Shows the relationship between "HeadingPairs" and "TitlesOfParts" properties.

auto doc = MakeObject<Document>(MyDir + u"Heading pairs and titles of parts.docx");
// We can find the combined values of these collections via
// "File" -> "Properties" -> "Advanced Properties" -> "Contents" tab.
// The HeadingPairs property is a collection of <string, int> pairs that
// determines how many document parts a heading spans across.
ArrayPtr<SharedPtr<System::Object>> headingPairs = doc->get_BuiltInDocumentProperties()->get_HeadingPairs();
// The TitlesOfParts property contains the names of parts that belong to the above headings.
ArrayPtr<String> titlesOfParts = doc->get_BuiltInDocumentProperties()->get_TitlesOfParts();
int headingPairsIndex = 0;
int titlesOfPartsIndex = 0;
while (headingPairsIndex < headingPairs->get_Length())
{
std::cout << "Parts for " << headingPairs[headingPairsIndex++] << ":" << std::endl;
int partsCount = System::Convert::ToInt32(headingPairs[headingPairsIndex++]);
for (int i = 0; i < partsCount; i++)
{
std::cout << "\t\"" << titlesOfParts[titlesOfPartsIndex++] << "\"" << std::endl;
}
}

◆ get_HyperlinkBase()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_HyperlinkBase ( )

Specifies the base string used for evaluating relative hyperlinks in this document.

Aspose.Words does not use this property.

Examples

Shows how to store the base part of a hyperlink in the document's properties.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert a relative hyperlink to a document in the local file system named "Document.docx".
// Clicking on the link in Microsoft Word will open the designated document, if it is available.
builder->InsertHyperlink(u"Relative hyperlink", u"Document.docx", false);
// This link is relative. If there is no "Document.docx" in the same folder
// as the document that contains this link, the link will be broken.
ASSERT_FALSE(System::IO::File::Exists(ArtifactsDir + u"Document.docx"));
doc->Save(ArtifactsDir + u"DocumentProperties.HyperlinkBase.BrokenLink.docx");
// The document we are trying to link to is in a different directory to the one we are planning to save the document in.
// We could fix links like this by putting an absolute filename in each one.
// Alternatively, we could provide a base link that every hyperlink with a relative filename
// will prepend to its link when we click on it.
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
properties->set_HyperlinkBase(MyDir);
ASSERT_TRUE(System::IO::File::Exists(properties->get_HyperlinkBase() +
(System::DynamicCast<FieldHyperlink>(doc->get_Range()->get_Fields()->idx_get(0)))->get_Address()));
doc->Save(ArtifactsDir + u"DocumentProperties.HyperlinkBase.WorkingLink.docx");

◆ get_Keywords()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_Keywords ( )

Gets or sets the document keywords.

Examples

Shows how to work with built-in document properties in the "Description" category.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// Below are four built-in document properties that have fields that can display their values in the document body.
// 1 - "Author" property, which we can display using an AUTHOR field:
properties->set_Author(u"John Doe");
builder->Write(u"Author:\t");
builder->InsertField(FieldType::FieldAuthor, true);
// 2 - "Title" property, which we can display using a TITLE field:
properties->set_Title(u"John's Document");
builder->Write(u"\nDoc title:\t");
builder->InsertField(FieldType::FieldTitle, true);
// 3 - "Subject" property, which we can display using a SUBJECT field:
properties->set_Subject(u"My subject");
builder->Write(u"\nSubject:\t");
builder->InsertField(FieldType::FieldSubject, true);
// 4 - "Comments" property, which we can display using a COMMENTS field:
properties->set_Comments(String::Format(u"This is {0}'s document about {1}", properties->get_Author(), properties->get_Subject()));
builder->Write(u"\nComments:\t\"");
builder->InsertField(FieldType::FieldComments, true);
builder->Write(u"\"");
// The "Category" built-in property does not have a field that can display its value.
properties->set_Category(u"My category");
// We can set multiple keywords for a document by separating the string value of the "Keywords" property with semicolons.
properties->set_Keywords(u"Tag 1; Tag 2; Tag 3");
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details".
// The "Author" built-in property is in the "Origin" group, and the others are in the "Description" group.
doc->Save(ArtifactsDir + u"DocumentProperties.Description.docx");

◆ get_LastPrinted()

System::DateTime Aspose::Words::Properties::BuiltInDocumentProperties::get_LastPrinted ( )

Gets or sets the date when the document was last printed in UTC.

For documents originated from RTF format this property returns the local time of last print operation.

If the document was never printed, this property will return DateTime.MinValue.

Aspose.Words does not update this property.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

◆ get_LastSavedBy()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_LastSavedBy ( )

Gets or sets the name of the last author.

Aspose.Words does not update this property.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

◆ get_LastSavedTime()

System::DateTime Aspose::Words::Properties::BuiltInDocumentProperties::get_LastSavedTime ( )

Gets or sets the time of the last save in UTC.

For documents originated from RTF format this property returns the local time of last save operation.

Aspose.Words does not update this property.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

Shows how to use the SAVEDATE field to display the date/time of the document's most recent save operation performed using Microsoft Word.

auto doc = MakeObject<Document>(MyDir + u"Document.docx");
auto builder = MakeObject<DocumentBuilder>(doc);
builder->MoveToDocumentEnd();
builder->Writeln(u" Date this document was last saved:");
// We can use the SAVEDATE field to display the last save operation's date and time on the document.
// The save operation that these fields refer to is the manual save in an application like Microsoft Word,
// not the document's Save method.
// Below are three different calendar types according to which the SAVEDATE field can display the date/time.
// 1 - Islamic Lunar Calendar:
builder->Write(u"According to the Lunar Calendar - ");
auto field = System::DynamicCast<FieldSaveDate>(builder->InsertField(FieldType::FieldSaveDate, true));
field->set_UseLunarCalendar(true);
ASSERT_EQ(u" SAVEDATE \\h", field->GetFieldCode());
// 2 - Umm al-Qura calendar:
builder->Write(u"\nAccording to the Umm al-Qura calendar - ");
field = System::DynamicCast<FieldSaveDate>(builder->InsertField(FieldType::FieldSaveDate, true));
field->set_UseUmAlQuraCalendar(true);
ASSERT_EQ(u" SAVEDATE \\u", field->GetFieldCode());
// 3 - Indian National calendar:
builder->Write(u"\nAccording to the Indian National calendar - ");
field = System::DynamicCast<FieldSaveDate>(builder->InsertField(FieldType::FieldSaveDate, true));
field->set_UseSakaEraCalendar(true);
ASSERT_EQ(u" SAVEDATE \\s", field->GetFieldCode());
// The SAVEDATE fields draw their date/time values from the LastSavedTime built-in property.
// The document's Save method will not update this value, but we can still update it manually.
doc->get_BuiltInDocumentProperties()->set_LastSavedTime(System::DateTime::get_Now());
doc->UpdateFields();
doc->Save(ArtifactsDir + u"Field.SAVEDATE.docx");

◆ get_Lines()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_Lines ( )

Represents an estimate of the number of lines in the document.

Aspose.Words updates this property when you call UpdateWordCount().

Examples

Shows how to update all list labels in a document.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Writeln(String(u"Lorem ipsum dolor sit amet, consectetur adipiscing elit, ") +
u"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
builder->Write(String(u"Ut enim ad minim veniam, ") + u"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.");
// Aspose.Words does not track document metrics like these in real time.
ASSERT_EQ(0, doc->get_BuiltInDocumentProperties()->get_Characters());
ASSERT_EQ(0, doc->get_BuiltInDocumentProperties()->get_Words());
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Paragraphs());
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Lines());
// To get accurate values for three of these properties, we will need to update them manually.
doc->UpdateWordCount();
ASSERT_EQ(196, doc->get_BuiltInDocumentProperties()->get_Characters());
ASSERT_EQ(36, doc->get_BuiltInDocumentProperties()->get_Words());
ASSERT_EQ(2, doc->get_BuiltInDocumentProperties()->get_Paragraphs());
// For the line count, we will need to call a specific overload of the updating method.
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Lines());
doc->UpdateWordCount(true);
ASSERT_EQ(4, doc->get_BuiltInDocumentProperties()->get_Lines());

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ get_LinksUpToDate()

bool Aspose::Words::Properties::BuiltInDocumentProperties::get_LinksUpToDate ( )

Indicates whether hyperlinks in a document are up-to-date.

Aspose.Words does not update this property.

Examples

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ get_Manager()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_Manager ( )

Gets or sets the manager property.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

◆ get_NameOfApplication()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_NameOfApplication ( )

Gets or sets the name of the application.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

◆ get_Pages()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_Pages ( )

Represents an estimate of the number of pages in the document.

Aspose.Words updates this property when you call UpdatePageLayout.

Examples

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ get_Paragraphs()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_Paragraphs ( )

Represents an estimate of the number of paragraphs in the document.

Aspose.Words updates this property when you call UpdateWordCount.

Examples

Shows how to update all list labels in a document.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Writeln(String(u"Lorem ipsum dolor sit amet, consectetur adipiscing elit, ") +
u"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
builder->Write(String(u"Ut enim ad minim veniam, ") + u"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.");
// Aspose.Words does not track document metrics like these in real time.
ASSERT_EQ(0, doc->get_BuiltInDocumentProperties()->get_Characters());
ASSERT_EQ(0, doc->get_BuiltInDocumentProperties()->get_Words());
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Paragraphs());
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Lines());
// To get accurate values for three of these properties, we will need to update them manually.
doc->UpdateWordCount();
ASSERT_EQ(196, doc->get_BuiltInDocumentProperties()->get_Characters());
ASSERT_EQ(36, doc->get_BuiltInDocumentProperties()->get_Words());
ASSERT_EQ(2, doc->get_BuiltInDocumentProperties()->get_Paragraphs());
// For the line count, we will need to call a specific overload of the updating method.
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Lines());
doc->UpdateWordCount(true);
ASSERT_EQ(4, doc->get_BuiltInDocumentProperties()->get_Lines());

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ get_RevisionNumber()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_RevisionNumber ( )

Gets or sets the document revision number.

Aspose.Words does not update this property.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

Shows how to work with REVNUM fields.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Write(u"Current revision #");
// Insert a REVNUM field, which displays the document's current revision number property.
auto field = System::DynamicCast<FieldRevNum>(builder->InsertField(FieldType::FieldRevisionNum, true));
ASSERT_EQ(u" REVNUM ", field->GetFieldCode());
ASSERT_EQ(u"1", field->get_Result());
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_RevisionNumber());
// This property counts how many times a document has been saved in Microsoft Word,
// and is unrelated to tracked revisions. We can find it by right clicking the document in Windows Explorer
// via Properties -> Details. We can update this property manually.
doc->get_BuiltInDocumentProperties()->set_RevisionNumber(doc->get_BuiltInDocumentProperties()->get_RevisionNumber() + 1);
field->Update();
ASSERT_EQ(u"2", field->get_Result());

◆ get_Security()

Aspose::Words::Properties::DocumentSecurity Aspose::Words::Properties::BuiltInDocumentProperties::get_Security ( )

Specifies the security level of a document as a numeric value.

Use this property for informational purposes only because Microsoft Word does not always set this property. This property is available in DOC and OOXML documents only.

To protect or unprotect a document use the Protect() and Unprotect methods.

Aspose.Words updates this property to a correct value before saving a document.

Examples

Shows how to use document properties to display the security level of a document.

auto doc = MakeObject<Document>();
ASSERT_EQ(DocumentSecurity::None, doc->get_BuiltInDocumentProperties()->get_Security());
// If we configure a document to be read-only, it will display this status using the "Security" built-in property.
doc->get_WriteProtection()->set_ReadOnlyRecommended(true);
doc->Save(ArtifactsDir + u"DocumentProperties.Security.ReadOnlyRecommended.docx");
ASSERT_EQ(
MakeObject<Document>(ArtifactsDir + u"DocumentProperties.Security.ReadOnlyRecommended.docx")->get_BuiltInDocumentProperties()->get_Security());
// Write-protect a document, and then verify its security level.
doc = MakeObject<Document>();
ASSERT_FALSE(doc->get_WriteProtection()->get_IsWriteProtected());
doc->get_WriteProtection()->SetPassword(u"MyPassword");
ASSERT_TRUE(doc->get_WriteProtection()->ValidatePassword(u"MyPassword"));
ASSERT_TRUE(doc->get_WriteProtection()->get_IsWriteProtected());
doc->Save(ArtifactsDir + u"DocumentProperties.Security.ReadOnlyEnforced.docx");
MakeObject<Document>(ArtifactsDir + u"DocumentProperties.Security.ReadOnlyEnforced.docx")->get_BuiltInDocumentProperties()->get_Security());
// "Security" is a descriptive property. We can edit its value manually.
doc = MakeObject<Document>();
doc->Protect(ProtectionType::AllowOnlyComments, u"MyPassword");
doc->get_BuiltInDocumentProperties()->set_Security(DocumentSecurity::ReadOnlyExceptAnnotations);
doc->Save(ArtifactsDir + u"DocumentProperties.Security.ReadOnlyExceptAnnotations.docx");
MakeObject<Document>(ArtifactsDir + u"DocumentProperties.Security.ReadOnlyExceptAnnotations.docx")
->get_BuiltInDocumentProperties()

◆ get_Subject()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_Subject ( )

Gets or sets the subject of the document.

Examples

Shows how to work with built-in document properties in the "Description" category.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// Below are four built-in document properties that have fields that can display their values in the document body.
// 1 - "Author" property, which we can display using an AUTHOR field:
properties->set_Author(u"John Doe");
builder->Write(u"Author:\t");
builder->InsertField(FieldType::FieldAuthor, true);
// 2 - "Title" property, which we can display using a TITLE field:
properties->set_Title(u"John's Document");
builder->Write(u"\nDoc title:\t");
builder->InsertField(FieldType::FieldTitle, true);
// 3 - "Subject" property, which we can display using a SUBJECT field:
properties->set_Subject(u"My subject");
builder->Write(u"\nSubject:\t");
builder->InsertField(FieldType::FieldSubject, true);
// 4 - "Comments" property, which we can display using a COMMENTS field:
properties->set_Comments(String::Format(u"This is {0}'s document about {1}", properties->get_Author(), properties->get_Subject()));
builder->Write(u"\nComments:\t\"");
builder->InsertField(FieldType::FieldComments, true);
builder->Write(u"\"");
// The "Category" built-in property does not have a field that can display its value.
properties->set_Category(u"My category");
// We can set multiple keywords for a document by separating the string value of the "Keywords" property with semicolons.
properties->set_Keywords(u"Tag 1; Tag 2; Tag 3");
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details".
// The "Author" built-in property is in the "Origin" group, and the others are in the "Description" group.
doc->Save(ArtifactsDir + u"DocumentProperties.Description.docx");

◆ get_Template()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_Template ( )

Gets or sets the informational name of the document template.

In Microsoft Word, this property is for informational purposes only and usually contains only the file name of the template without the path.

Empty string means the document is attached to the Normal template.

To get or set the actual name of the attached template, use the AttachedTemplate property.

See also
Aspose::Words::Document::get_AttachedTemplate
Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

◆ get_Thumbnail()

System::ArrayPtr<uint8_t> Aspose::Words::Properties::BuiltInDocumentProperties::get_Thumbnail ( )

Gets or sets the thumbnail of the document.

For now this property is used only when a document is being exported to ePub, it's not read from and written to other document formats.

Image of arbitrary format can be set to this property, but the format is checked during export. InvalidOperationException is thrown if the image is invalid or its format is unsupported for specific format of document.

Only gif, jpeg and png images can be used for ePub publication.

Examples

Shows how to add a thumbnail to a document that we save as an Epub.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Writeln(u"Hello world!");
// If we save a document, whose "Thumbnail" property contains image data that we added, as an Epub,
// a reader that opens that document may display the image before the first page.
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
ArrayPtr<uint8_t> thumbnailBytes = System::IO::File::ReadAllBytes(ImageDir + u"Logo.jpg");
properties->set_Thumbnail(thumbnailBytes);
doc->Save(ArtifactsDir + u"DocumentProperties.Thumbnail.epub");
// We can extract a document's thumbnail image and save it to the local file system.
SharedPtr<DocumentProperty> thumbnail = doc->get_BuiltInDocumentProperties()->idx_get(u"Thumbnail");
System::IO::File::WriteAllBytes(ArtifactsDir + u"DocumentProperties.Thumbnail.gif", thumbnail->ToByteArray());

◆ get_Title()

System::String Aspose::Words::Properties::BuiltInDocumentProperties::get_Title ( )

Gets or sets the title of the document.

Examples

Shows how to work with built-in document properties in the "Description" category.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// Below are four built-in document properties that have fields that can display their values in the document body.
// 1 - "Author" property, which we can display using an AUTHOR field:
properties->set_Author(u"John Doe");
builder->Write(u"Author:\t");
builder->InsertField(FieldType::FieldAuthor, true);
// 2 - "Title" property, which we can display using a TITLE field:
properties->set_Title(u"John's Document");
builder->Write(u"\nDoc title:\t");
builder->InsertField(FieldType::FieldTitle, true);
// 3 - "Subject" property, which we can display using a SUBJECT field:
properties->set_Subject(u"My subject");
builder->Write(u"\nSubject:\t");
builder->InsertField(FieldType::FieldSubject, true);
// 4 - "Comments" property, which we can display using a COMMENTS field:
properties->set_Comments(String::Format(u"This is {0}'s document about {1}", properties->get_Author(), properties->get_Subject()));
builder->Write(u"\nComments:\t\"");
builder->InsertField(FieldType::FieldComments, true);
builder->Write(u"\"");
// The "Category" built-in property does not have a field that can display its value.
properties->set_Category(u"My category");
// We can set multiple keywords for a document by separating the string value of the "Keywords" property with semicolons.
properties->set_Keywords(u"Tag 1; Tag 2; Tag 3");
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details".
// The "Author" built-in property is in the "Origin" group, and the others are in the "Description" group.
doc->Save(ArtifactsDir + u"DocumentProperties.Description.docx");

◆ get_TitlesOfParts()

System::ArrayPtr<System::String> Aspose::Words::Properties::BuiltInDocumentProperties::get_TitlesOfParts ( )

Each string in the array specifies the name of a part in the document.

Aspose.Words does not update this property.

See also
Aspose::Words::Properties::BuiltInDocumentProperties::get_HeadingPairs
Examples

Shows the relationship between "HeadingPairs" and "TitlesOfParts" properties.

auto doc = MakeObject<Document>(MyDir + u"Heading pairs and titles of parts.docx");
// We can find the combined values of these collections via
// "File" -> "Properties" -> "Advanced Properties" -> "Contents" tab.
// The HeadingPairs property is a collection of <string, int> pairs that
// determines how many document parts a heading spans across.
ArrayPtr<SharedPtr<System::Object>> headingPairs = doc->get_BuiltInDocumentProperties()->get_HeadingPairs();
// The TitlesOfParts property contains the names of parts that belong to the above headings.
ArrayPtr<String> titlesOfParts = doc->get_BuiltInDocumentProperties()->get_TitlesOfParts();
int headingPairsIndex = 0;
int titlesOfPartsIndex = 0;
while (headingPairsIndex < headingPairs->get_Length())
{
std::cout << "Parts for " << headingPairs[headingPairsIndex++] << ":" << std::endl;
int partsCount = System::Convert::ToInt32(headingPairs[headingPairsIndex++]);
for (int i = 0; i < partsCount; i++)
{
std::cout << "\t\"" << titlesOfParts[titlesOfPartsIndex++] << "\"" << std::endl;
}
}

◆ get_TotalEditingTime()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_TotalEditingTime ( )

Gets or sets the total editing time in minutes.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

◆ get_Version()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_Version ( )

Represents the version number of the application that created the document.

When a document was created by Microsoft Word, then high 16 bit represent the major version and low 16 bit represent the build number.

Examples

Shows how to work with document properties in the "Origin" category.

// Open a document that we have created and edited using Microsoft Word.
auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// The following built-in properties contain information regarding the creation and editing of this document.
// We can right-click this document in Windows Explorer and find
// these properties via "Properties" -> "Details" -> "Origin" category.
// Fields such as PRINTDATE and EDITTIME can display these values in the document body.
std::cout << "Created using " << properties->get_NameOfApplication() << ", on " << properties->get_CreatedTime() << std::endl;
std::cout << "Minutes spent editing: " << properties->get_TotalEditingTime() << std::endl;
std::cout << "Date/time last printed: " << properties->get_LastPrinted() << std::endl;
std::cout << "Template document: " << properties->get_Template() << std::endl;
// We can also change the values of built-in properties.
properties->set_Company(u"Doe Ltd.");
properties->set_Manager(u"Jane Doe");
properties->set_Version(5);
properties->set_RevisionNumber(properties->get_RevisionNumber() + 1);
// Microsoft Word updates the following properties automatically when we save the document.
// To use these properties with Aspose.Words, we will need to set values for them manually.
properties->set_LastSavedBy(u"John Doe");
properties->set_LastSavedTime(System::DateTime::get_Now());
// We can right-click this document in Windows Explorer and find these properties in "Properties" -> "Details" -> "Origin".
doc->Save(ArtifactsDir + u"DocumentProperties.Origin.docx");

◆ get_Words()

int32_t Aspose::Words::Properties::BuiltInDocumentProperties::get_Words ( )

Represents an estimate of the number of words in the document.

Aspose.Words updates this property when you call UpdateWordCount.

Examples

Shows how to update all list labels in a document.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Writeln(String(u"Lorem ipsum dolor sit amet, consectetur adipiscing elit, ") +
u"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
builder->Write(String(u"Ut enim ad minim veniam, ") + u"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.");
// Aspose.Words does not track document metrics like these in real time.
ASSERT_EQ(0, doc->get_BuiltInDocumentProperties()->get_Characters());
ASSERT_EQ(0, doc->get_BuiltInDocumentProperties()->get_Words());
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Paragraphs());
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Lines());
// To get accurate values for three of these properties, we will need to update them manually.
doc->UpdateWordCount();
ASSERT_EQ(196, doc->get_BuiltInDocumentProperties()->get_Characters());
ASSERT_EQ(36, doc->get_BuiltInDocumentProperties()->get_Words());
ASSERT_EQ(2, doc->get_BuiltInDocumentProperties()->get_Paragraphs());
// For the line count, we will need to call a specific overload of the updating method.
ASSERT_EQ(1, doc->get_BuiltInDocumentProperties()->get_Lines());
doc->UpdateWordCount(true);
ASSERT_EQ(4, doc->get_BuiltInDocumentProperties()->get_Lines());

Shows how to work with document properties in the "Content" category.

void Content()
{
auto doc = MakeObject<Document>(MyDir + u"Paragraphs.docx");
SharedPtr<BuiltInDocumentProperties> properties = doc->get_BuiltInDocumentProperties();
// By using built in properties,
// we can treat document statistics such as word/page/character counts as metadata that can be glanced at without opening the document
// These properties are accessed by right clicking the file in Windows Explorer and navigating to Properties > Details > Content
// If we want to display this data inside the document, we can use fields such as NUMPAGES, NUMWORDS, NUMCHARS etc.
// Also, these values can also be viewed in Microsoft Word by navigating File > Properties > Advanced Properties > Statistics
// Page count: The PageCount property shows the page count in real time and its value can be assigned to the Pages property
// The "Pages" property stores the page count of the document.
ASSERT_EQ(6, properties->get_Pages());
// The "Words", "Characters", and "CharactersWithSpaces" built-in properties also display various document statistics,
// but we need to call the "UpdateWordCount" method on the whole document before we can expect them to contain accurate values.
doc->UpdateWordCount();
ASSERT_EQ(1035, properties->get_Words());
ASSERT_EQ(6026, properties->get_Characters());
ASSERT_EQ(7041, properties->get_CharactersWithSpaces());
// Count the number of lines in the document, and then assign the result to the "Lines" built-in property.
auto lineCounter = MakeObject<ExDocumentProperties::LineCounter>(doc);
properties->set_Lines(lineCounter->GetLineCount());
ASSERT_EQ(142, properties->get_Lines());
// Assign the number of Paragraph nodes in the document to the "Paragraphs" built-in property.
properties->set_Paragraphs(doc->GetChildNodes(NodeType::Paragraph, true)->get_Count());
ASSERT_EQ(29, properties->get_Paragraphs());
// Get an estimate of the file size of our document via the "Bytes" built-in property.
ASSERT_EQ(20310, properties->get_Bytes());
// Set a different template for our document, and then update the "Template" built-in property manually to reflect this change.
doc->set_AttachedTemplate(MyDir + u"Business brochure.dotx");
ASSERT_EQ(u"Normal", properties->get_Template());
properties->set_Template(doc->get_AttachedTemplate());
// "ContentStatus" is a descriptive built-in property.
properties->set_ContentStatus(u"Draft");
// Upon saving, the "ContentType" built-in property will contain the MIME type of the output save format.
ASSERT_EQ(String::Empty, properties->get_ContentType());
// If the document contains links, and they are all up to date, we can set the "LinksUpToDate" property to "true".
ASSERT_FALSE(properties->get_LinksUpToDate());
doc->Save(ArtifactsDir + u"DocumentProperties.Content.docx");
}
class LineCounter : public System::Object
{
public:
LineCounter(SharedPtr<Document> doc) : mLineCount(0), mScanningLineForRealText(false)
{
mLayoutEnumerator = MakeObject<LayoutEnumerator>(doc);
CountLines();
}
int GetLineCount()
{
return mLineCount;
}
private:
SharedPtr<LayoutEnumerator> mLayoutEnumerator;
int mLineCount;
bool mScanningLineForRealText;
void CountLines()
{
do
{
if (mLayoutEnumerator->get_Type() == LayoutEntityType::Line)
{
mScanningLineForRealText = true;
}
if (mLayoutEnumerator->MoveFirstChild())
{
if (mScanningLineForRealText && mLayoutEnumerator->get_Kind().StartsWith(u"TEXT"))
{
mLineCount++;
mScanningLineForRealText = false;
}
CountLines();
mLayoutEnumerator->MoveParent();
}
} while (mLayoutEnumerator->MoveNext());
}
};

◆ GetType()

virtual const System::TypeInfo& Aspose::Words::Properties::BuiltInDocumentProperties::GetType ( ) const
overridevirtual

◆ idx_get()

System::SharedPtr<Aspose::Words::Properties::DocumentProperty> Aspose::Words::Properties::BuiltInDocumentProperties::idx_get ( System::String  name)
overridevirtual

Returns a DocumentProperty object by the name of the property.

The string names of the properties correspond to the names of the typed properties available from BuiltInDocumentProperties.

If you request a property that is not present in the document, but the name of the property is recognized as a valid built-in name, a new DocumentProperty is created, added to the collection and returned. The newly created property is assigned a default value (empty string, zero, false or DateTime.MinValue depending on the type of the built-in property).

If you request a property that is not present in the document and the name is not recognized as a built-in name, a null is returned.

Parameters
nameThe case-insensitive name of the property to retrieve.
Examples

Shows how to work with custom document properties.

auto doc = MakeObject<Document>(MyDir + u"Properties.docx");
// Every document contains a collection of custom properties, which, like the built-in properties, are key-value pairs.
// The document has a fixed list of built-in properties. The user creates all of the custom properties.
ASSERT_EQ(u"Value of custom document property", System::ObjectExt::ToString(doc->get_CustomDocumentProperties()->idx_get(u"CustomProperty")));
doc->get_CustomDocumentProperties()->Add(u"CustomProperty2", String(u"Value of custom document property #2"));
std::cout << "Custom Properties:" << std::endl;
for (auto customDocumentProperty : System::IterateOver(doc->get_CustomDocumentProperties()))
{
std::cout << customDocumentProperty->get_Name() << std::endl;
std::cout << String::Format(u"\tType:\t{0}", customDocumentProperty->get_Type()) << std::endl;
std::cout << "\tValue:\t\"" << customDocumentProperty->get_Value() << "\"" << std::endl;
}

Reimplemented from Aspose::Words::Properties::DocumentPropertyCollection.

◆ Is()

virtual bool Aspose::Words::Properties::BuiltInDocumentProperties::Is ( const System::TypeInfo target) const
overridevirtual

◆ set_Author()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Author ( System::String  value)

◆ set_Bytes()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Bytes ( int32_t  value)

◆ set_Category()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Category ( System::String  value)

◆ set_Characters()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Characters ( int32_t  value)

◆ set_CharactersWithSpaces()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_CharactersWithSpaces ( int32_t  value)

◆ set_Comments()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Comments ( System::String  value)

◆ set_Company()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Company ( System::String  value)

◆ set_ContentStatus()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_ContentStatus ( System::String  value)

◆ set_ContentType()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_ContentType ( System::String  value)

◆ set_CreatedTime()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_CreatedTime ( System::DateTime  value)

◆ set_HeadingPairs()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_HeadingPairs ( System::ArrayPtr< System::SharedPtr< System::Object >>  value)

◆ set_HyperlinkBase()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_HyperlinkBase ( System::String  value)

◆ set_Keywords()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Keywords ( System::String  value)

◆ set_LastPrinted()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_LastPrinted ( System::DateTime  value)

◆ set_LastSavedBy()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_LastSavedBy ( System::String  value)

◆ set_LastSavedTime()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_LastSavedTime ( System::DateTime  value)

◆ set_Lines()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Lines ( int32_t  value)

◆ set_LinksUpToDate()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_LinksUpToDate ( bool  value)

◆ set_Manager()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Manager ( System::String  value)

◆ set_NameOfApplication()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_NameOfApplication ( System::String  value)

◆ set_Pages()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Pages ( int32_t  value)

◆ set_Paragraphs()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Paragraphs ( int32_t  value)

◆ set_RevisionNumber()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_RevisionNumber ( int32_t  value)

◆ set_Security()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Security ( Aspose::Words::Properties::DocumentSecurity  value)

◆ set_Subject()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Subject ( System::String  value)

◆ set_Template()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Template ( System::String  value)

◆ set_Thumbnail()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Thumbnail ( System::ArrayPtr< uint8_t >  value)

◆ set_Title()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Title ( System::String  value)

◆ set_TitlesOfParts()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_TitlesOfParts ( System::ArrayPtr< System::String value)

◆ set_TotalEditingTime()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_TotalEditingTime ( int32_t  value)

◆ set_Version()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Version ( int32_t  value)

◆ set_Words()

void Aspose::Words::Properties::BuiltInDocumentProperties::set_Words ( int32_t  value)

◆ Type()

static const System::TypeInfo& Aspose::Words::Properties::BuiltInDocumentProperties::Type ( )
static