
This method inserts a new image anchored to a paragraph. The text flows around the image.
Introduced: 12.0.
TXTextControl.ImageInsert FileName, TextPos, Alignment, PosX, PosY, ScaleX, ScaleY, TextFlow, DistanceL, DistanceT, DistanceR, DistanceB
| Parameter | Description | ||||||||||||||||
| FileName | Specifies the image file with a full path name. | ||||||||||||||||
| TextPos | Specifies a text position in the paragraph where the image should be inserted. If TextPos is -1, the image is anchored to the paragraph at the current input position. | ||||||||||||||||
| Alignment | Specifies the image's horizontal alignment. It can be one of the following values:
| ||||||||||||||||
| PosX | Specifies the image's horizontal position in twips, relative to the left border of the paragraph. This value is used if the Alignment parameter has been set to 0. | ||||||||||||||||
| PosY | Specifies the image's vertical position in twips relative to the top border of the paragraph. | ||||||||||||||||
| ScaleX | Specifies a horizontal scaling factor as a percentage. | ||||||||||||||||
| ScaleY | Specifies a vertical scaling factor as a percentage. | ||||||||||||||||
| TextFlow | Specifies how text flows around the image. It can be one of the following values:
| ||||||||||||||||
| DistanceL, DistanceT, DistanceR, DistanceB | Specifies distances, in twips, between the image and the document's text. |
The method returns the image's identifier, if a new image could be inserted. Otherwise, it returns zero. The image's identifier can also be obtained with the ObjectCurrent property.
| FileName: | String |
| TextPos: | Long |
| Alignment: | Integer |
| PosX: | Long |
| PosY: | Long |
| ScaleX: | Integer |
| ScaleY: | Integer |
| TextFlow: | Integer |
| DistanceL: | Integer |
| DistanceT: | Integer |
| DistanceR: | Integer |
| DistanceB: | Integer |
| Return value: | Integer |