# ObjectGetData Event

> Occurs when a document with objects inserted through their hWnd property is saved, so that the application can copy each object's data to ObjectData.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Event
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > ObjectGetData Event
- **245 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgetdata-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgetdata-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgetdata-event/llms-full.txt

---

Occurs when a document which contains objects, is saved. This event is sent only for objects that have been inserted via its hWnd property. In response to this event, the application can store the object's data by copying it into the ObjectData parameter.

### Syntax

```vbscript
ObjectGetData(ObjectId, ObjectData)
```

### Parameters

| Parameter | Description |
|---|---|
| ObjectId | Is the identifier of the object that is to be saved. |
| ObjectData | The object's private data can be copied to this parameter. |

### Data Types

| Name | Data type |
|---|---|
| ObjectId | Integer |
| ObjectData | Variant |

### Remarks

It is recommended to store binary data as a byte array and not as a string.

### See Also

- [ObjectSetData Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectsetdata-event/llms-full.txt)
- [ObjectGethWnd Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgethwnd-event/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:** [ObjectDistance Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectdistance-property/llms-full.txt)
- **Next:** [ObjectGetFromName Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectgetfromname-method/llms-full.txt)
