# ImageInsertAsChar Method

> Inserts an image from a file that is handled like a single character in the text, at a text position or the input position (-1), with scaling in percent.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > ImageInsertAsChar Method
- **329 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/imageinsertaschar-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/imageinsertaschar-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/imageinsertaschar-method/llms-full.txt

---

This method inserts a new image which is then handled like a single character in the text.

Introduced: 12.0.

### Syntax

```vbscript
TXTextControl.ImageInsertAsChar FileName, TextPos, ScaleX, ScaleY
```

### Parameters

| Parameter | Description |
|---|---|
| FileName | Specifies the image file with a full path name. |
| TextPos | Specifies a text position where the image should be inserted. If TextPos is -1, the image is inserted at the current input position. |
| ScaleX | Specifies a horizontal scaling factor as a percentage. |
| ScaleY | Specifies a vertical scaling factor as a percentage. |

### Return Value

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](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectcurrent-property/llms-full.txt) property.

### Data Types

| Name | Data type |
|---|---|
| FileName | String |
| TextPos | Long |
| ScaleX | Integer |
| ScaleY | Integer |
| Return value | Integer |

### See Also

- [ImageInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/imageinsert-method/llms-full.txt)
- [ImageInsertFixed Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/imageinsertfixed-method/llms-full.txt)
- [Programming Category: Images, Text Frames, Signature Fields and OLE Objects](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/images-objects/llms-full.txt)

---

## Nearby

- **Previous:** [ImageInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/imageinsert-method/llms-full.txt)
- **Next:** [ImageInsertFixed Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/imageinsertfixed-method/llms-full.txt)
