# ObjectGetFromName Method

> Returns the identifier of the object with a name set through the ObjectName property, for use with ObjectCurrent; the first match is returned for duplicates.

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

---

Looks for the object with the specified name. It must be a name previously set with the [ObjectName](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectname-property/llms-full.txt) property.

Introduced: 15.1.

### Syntax

```vbscript
TXTextControl.ObjectGetFromName ObjectName
```

### Parameters

| Parameter | Description |
|---|---|
| ObjectName | Specifies the name of the object. |

### Return Value

The method returns the object's unique programming identifier. This identifier can be used with the [ObjectCurrent](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectcurrent-property/llms-full.txt) property to get or to alter the object's attributes.

### Data Types

| Name | Data type |
|---|---|
| ObjectName | String |
| Return value | Integer |

### Remarks

If there are more than one object with this name, the unique programming identifier of the first found object is returned.

### 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:** [ObjectGetData Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgetdata-event/llms-full.txt)
- **Next:** [ObjectGetFromUserId Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgetfromuserid-method/llms-full.txt)
