BuiltInDocumentPropertiesHeadingPairs Property

Specifies document headings and their names.

Namespace:  Aspose.Words.Properties
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public Object[] HeadingPairs { get; set; }

Property Value

Type: Object
Remarks

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.

Examples
Shows the relationship between HeadingPairs and TitlesOfParts properties.
// Open a document that contains entries in the HeadingPairs/TitlesOfParts properties
Document doc = new Document(MyDir + "Heading pairs and titles of parts.docx");

// We can find the combined values of these collections in 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 over
object[] headingPairs = doc.BuiltInDocumentProperties.HeadingPairs;

// The TitlesOfParts property contains the names of parts that belong to the above headings
string[] titlesOfParts = doc.BuiltInDocumentProperties.TitlesOfParts;
See Also