Contains all subtextparts in the main text or another main part of a document. It is a collection of objects of the type SubTextPart. A collection object can be obtained with the TextControl.SubTextParts, the HeaderFooter.SubTextParts or the TextFrame.SubTextParts property. The SubTextPartCollection class implements the IEnumerable and the ICollection interfaces. The text of each main part of the document, which are the main text, a header or footer or a textframe, can be divided in further parts, called subtextparts. A subtextpart must be a selectable part of the document. It can immediately follow its previous textpart. The position between two textparts belongs to the following textpart. Subtextparts can be nested. A nested textpart must be smaller than its outer textpart. A nested textpart can start or end at the same position as its outer textpart, but a nested textpart cannot have the same length as its outer textpart. To insert a nested textpart its outer textpart must be inserted first. A textpart cannot have a length of zero. When the last character of a textpart is deleted, the textpart itself is also deleted.


public sealed class SubTextPartCollection
Public NotInheritable Class SubTextPartCollection

Introduced: X13.


Enumeration Description
AddResult Specifies the result when a subtextpart has been added to the document.


Method Description
Add Adds a new subtextpart to the document.
CopyTo Copies the elements of the collection to an array, starting at a particular index.
GetEnumerator Returns an enumerator that can be used to iterate through the collection.
GetItem Gets a particular subtextpart from the collection.
Remove Removes a subtextpart from the collection including all its nested subtextparts.


Property Description
Count Gets the number of elements contained in the collection.
IsSynchronized Returns true if the collection is designed to be thread safe, otherwise, it returns false.
Item Gets the subtextpart with the specified number from the collection.
SyncRoot Gets an object that can be used to synchronize access to the collection.