FormattedDocumentItemCollection.Insert

Syntax:

Insert(<Index>, <Value>, <ItemType>)

Parameters:

<Index> (required)

Type: Number.
Position in formatted document, where you need to insert item to.

<Value> (optional)

Type: Arbitrary.
Contains the value which is inserted to the collection.
Depending on <ElementType> parameter value of the current method, the value can be read in various ways.
If parameter value is FormattedDocumentText, then string presentation of transferred value will be inserted to the collection.
If value is FormattedDocumentPicture, then <Value> type should be either Picture, or String, containing URL of the picture. Otherwise, the exception is called.
If parameter value is FormattedDocumentLinefeed, then parameter value is ignored and string transfer is inserted to the collection.
If parameter value is Undefined, and collection of items of the formatted document contains only paragraphs, then an empty paragraph is inserted to the collection.
Default value: Undefined.

<ItemType> (optional)

Type: Type.
Specifies the type of element to be inserted. The <Value> parameter of this method is interpreted depending on value of this parameter.
A collection can contain the following objects:
1) FormattedDocumentText
2) FormattedDocumentPicture
3) FormattedDocumentLinefeed
The <Value> parameter of this method is interpreted depending on value of this parameter.
Default value: FormattedDocumentText.

Returned value:

Type: FormattedDocumentParagraph; FormattedDocumentText; FormattedDocumentLinefeed; FormattedDocumentPicture.
Returns inserted item.

Description:

Inserts an item into specified position of formatted document.

Availability:

Thin client, web-client, server, thick client, external connection.

Note:

Inserting pictures is only available at the server.
Picture must be absolute.

    

1C:Enterprise Developer's Community