# ObjectGetSelected Method

> Returns the identifier of the selected object, or zero, filtered by kind: fixed, as character, anchored, image, text frame, OLE object or signature field.

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

---

This method returns the identifier of the currently selected object. An object is selected, if a frame with size handles is drawn around the object. This method can also be used to determine whether a certain kind of object, image, text frame, signature field or OLE object, is selected.

Introduced: 12.0.

### Syntax

```vbscript
TXTextControl.ObjectGetSelected ObjectKind
```

### Parameters

| Parameter | Description |
|---|---|
| ObjectKind | This parameter specifies which kind of objects are searched. It can be a sum of the values, described in Remarks. If this parameter is zero, all objects are searched. |

### Return Value

The method returns the identifier of an object. It returns zero if no object of the specified kind is selected.

### Data Types

| Name | Data type |
|---|---|
| ObjectKind | Integer |
| Return value | Integer |

### Remarks

The settings for ObjectKind can include:

| Value | Description |
|---|---|
| &H1 | Looks only for objects positioned at a fixed geometrical position. |
| &H2 | Looks only for objects that act as a single character. |
| &H4 | Looks only for images. |
| &H8 | Looks only for objects which are externally created by the application. |
| &H10 | Looks only for OLE objects. |
| &H20 | Looks only for text frames. |
| &H40 | Looks only for objects that are anchored to a paragraph. |
| &H400 | Looks only for 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:** [ObjectGethWnd Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgethwnd-event/llms-full.txt)
- **Next:** [ObjectGetZoom Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgetzoom-event/llms-full.txt)
