# ObjectInsertFixed Method

> Inserts an OLE object or other control at a fixed position on the page in twips, with scaling, size mode, text flow and distances, and returns its identifier.

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

---

This method inserts a new OLE object or other control at a fixed geometrical position. The text flows around the object.

### Syntax

```vbscript
TXTextControl.ObjectInsertFixed ObjectType, FileName, PosX, PosY, ScaleX, ScaleY, ImageDisplayMode, ImageSaveMode, SizeMode, TextFlow, DistanceL, DistanceT, DistanceR, DistanceB[, KindOfObject]
```

### Parameters

| Parameter | Description |
|---|---|
| ObjectType | Specifies the type of object. It can be one of the following identifiers: |
| FileName | The meaning of this parameter depends on the object that is to be inserted. See the description of the ObjectType parameter. This parameter must be zero, if the ObjectType parameter specifies a handle to a control. |
| PosX | Specifies the object's horizontal position in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips) relative to the left border of the page. |
| PosY | Specifies the object's vertical position in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips) relative to the top of the first page. |
| ScaleX | Specifies a horizontal scaling factor as a percentage. |
| ScaleY | Specifies a vertical scaling factor as a percentage. |
| ImageDisplayMode | This parameter is obsolete and must be set to zero. |
| ImageSaveMode | This parameter is obsolete and must be set to zero. |
| SizeMode | Specifies whether the image or object can be moved and/or sized. See the [ObjectSizeMode](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectsizemode-property/llms-full.txt) property for possible values. |
| TextFlow | Specifies how text flows around the image or object. It can be one of the following values: |
| DistanceL, DistanceT, DistanceR, DistanceB | Specifies distances, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips), between the image or object and the text. |
| KindOfObject | Optional. Specifies an identifier for controls that are not OLE objects. If a document is loaded which contains such controls, an [ObjectGethWnd](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgethwnd-event/llms-full.txt) event occurs for each control to give an application the opportunity of recreating these controls. This parameter can be used to handle groups of different control types, like buttons or checkboxes. |

#### ObjectType

| Value | Description |
|---|---|
| 1 - OLE object | Inserts an OLE object. The type of object can be selected with the system embedded OLE Insert dialog box. |
| 2 - OLE object (programmatic identifier) | Creates a newly created OLE object. In this case, the FileName parameter must specify a string which is the programmatic identifier of the OLE object to insert. The programmatic identifier is stored under the ProgID key in the registration database. |
| 3 - OLE object (embedded) | Inserts a newly created embedded OLE object from a file. In this case, the FileName parameter must specify a valid filename. |
| 4 - OLE object (linked) | Inserts a newly created linked OLE object from a file. In this case, the FileName parameter must specify a valid filename. |
| Otherwise | Specifies a handle to a control that can be obtained with a control's hWnd property. In this case the FileName parameter must be set to zero. |

#### TextFlow

| Value | Description |
|---|---|
| 2 | The text stops at the top and continues at the bottom of the object. |
| 3 | The text flows around the object and empty areas at the left and right side are filled. |

### Return Value

The method returns the object's identifier when an object could be inserted. Otherwise, it returns zero. The object'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 |
|---|---|
| ObjectType | Handle |
| FileName | String |
| PosX | Long |
| PosY | Long |
| ScaleX | Integer |
| ScaleY | Integer |
| ImageDisplayMode | Integer |
| ImageSaveMode | Integer |
| SizeMode | Integer |
| TextFlow | Integer |
| DistanceL | Integer |
| DistanceT | Integer |
| DistanceR | Integer |
| DistanceB | Integer |
| KindOfObject | Integer |
| Return value | Integer |

### See Also

- [ObjectInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectinsert-method/llms-full.txt)
- [ObjectInsertAsChar Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectinsertaschar-method/llms-full.txt)
- [Object attribute properties](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/images-objects/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:** [ObjectInsertAsChar Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectinsertaschar-method/llms-full.txt)
- **Next:** [ObjectInsertionMode Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectinsertionmode-property/llms-full.txt)
