IParagraphCollection module

class IParagraphCollection.IParagraphCollection

Bases: IDocumentObjectCollection, ICollectionBase, IEnumerable

Represents a collection of paragraphs in a document.

abstract Add(paragraph: IParagraph) int

Adds a paragraph to the collection.

Parameters:

paragraph (IParagraph) – The paragraph to add.

Returns:

The index at which the paragraph was added.

Return type:

int

abstract IndexOf(paragraph: IParagraph) int

Gets the index of the specified paragraph.

Parameters:

paragraph (IParagraph) – The paragraph to find.

Returns:

The index of the specified paragraph.

Return type:

int

abstract Insert(index: int, paragraph: IParagraph)

Inserts a paragraph at the specified index.

Parameters:
  • index (int) – The index at which to insert the paragraph.

  • paragraph (IParagraph) – The paragraph to insert.

abstract RemoveAt(index: int)

Removes the paragraph at the specified index.

Parameters:

index (int) – The index of the paragraph to remove.

abstract get_Item(index: int) Paragraph

Gets the paragraph at the specified index.

Parameters:

index (int) – The index of the paragraph.

Returns:

The paragraph at the specified index.

Return type:

Paragraph