# ObjectNext Method

> Returns the identifier of the object that follows a given one in the internal object list, filtered by kind, to iterate images, text frames and OLE objects.

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

---

This method returns the identifier of the object that follows the specified object in a Text Control's internal list of objects.

### Syntax

```vbscript
TXTextControl.ObjectNext ObjectId, ObjectGroup
```

### Parameters

| Parameter | Description |
|---|---|
| ObjectId | Specifies a valid object identifier. If this parameter is zero, the first object's identifier is returned. |
| ObjectGroup | This parameter specifies which kinds of objects are to be returned. It can be a sum of the values as described in Remarks. If this parameter is zero, the identifiers of all objects are returned. |

### Return Value

The method returns the next object's identifier. It returns zero when there is no following object.

### Data Types

| Name | Data type |
|---|---|
| ObjectId | Integer |
| ObjectGroup | Integer |
| Return value | Integer |

### Remarks

The settings for ObjectGroup can include:

| Value | Description |
|---|---|
| &H1 | Returns only identifiers of objects positioned at a fixed geometrical position. |
| &H2 | Returns only identifiers of objects that act as single characters. |
| &H4 | Returns only identifiers of images. |
| &H8 | Returns only identifiers of objects which are externally created by the application. |
| &H10 | Returns only identifiers of OLE objects. |
| &H20 | Returns only identifiers of text frames. |
| &H40 | Returns only identifiers of objects that are anchored to a paragraph. |
| &H400 | Returns only identifiers of signature fields. |

### See Also

- [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:** [ObjectName Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectname-property/llms-full.txt)
- **Next:** [ObjectPosX Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectposx-property/llms-full.txt)
