FormattedDocumentItemCollection.Add

Syntax:

Add(<Value>, <ItemType>)

Parameters:

<Value> (optional)

Type: Arbitrary.
Item to be added to collection.
Value is interpreted in different ways, depending on <ItemType> parameter of this method.
If parameter value is Text, then a string presentation of passed value will be added to collection.
If parameter value is Picture, then type of <Value> parameter myst be either Picture or a String, containing the picture URL. Otherwise, the exception occures.
If parameter value is Linefeed, then parameter value is ignored and line feed is added to the collection.
If parameter value is Undefined, and item collection of formatted document contains only paragraphs, then an empty paragraph is added to collection.
Default value: Undefined.

<ItemType> (optional)

Type: Type.
Type of the item to be added to the collection. 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 an added item.

Description:

Adds an item to the end of item collection in the formatted document.

Availability:

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

Note:

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

    

1C:Enterprise Developer's Community