# AppendFromMemory Method

> Appends a byte array in a given format to the end of the document, optionally starting with a new paragraph or section; returns True on success. With example.

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

---

Appends text in a certain format from a buffer and inserts it at the end of the current document.

Introduced: 22.0.

### Syntax

```vbscript
TXTextControl.AppendFromMemory DataArray[, Format[, AppendSettings]]
```

### Parameters

| Parameter | Description |
|---|---|
| DataArray | Specifies the byte array to load from. |
| Format | Optional. Specifies a format identifier. When not specified Text Control assumes Text Control's internal format (3). See the Format parameter of the [Load](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/load-method/llms-full.txt) method for possible format identifiers. |
| AppendSettings | Optional. When omitted, the text is inserted at the last position of the last paragraph. Otherwise, it must be one of the following **AppendSettingsConstants** constants: |

#### AppendSettings

| Constant | Meaning |
|---|---|
| txStartWithNewParagraph | Appends the text starting with a new paragraph. |
| txStartWithNewSection | Appends the text starting with a new section on a new page. |

### Return Value

The method returns True if the data could be appended, otherwise it returns False.

### Data Types

| Name | Data type |
|---|---|
| DataArray | One-dimensional Byte Array |
| Format | Integer |
| AppendSettings | Integer |
| Return value | Boolean |

### Examples

This Basic example copies the current contents of a TXTextcontrol to a buffer and appends this text at end of the document starting with a new section:

```vbscript
Dim data() As Byte
data = TXTextControl1.SaveToMemory(3)
TXTextControl1.AppendFromMemory data, 3, AppendSettingsConstants.txStartWithNewSection
```

### See Also

- [PDF Export](https://docs.textcontrol.com/tx-text-control-activex/pdf/llms-full.txt)
- [Load Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/load-method/llms-full.txt)
- [LoadFromMemory Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/loadfrommemory-method/llms-full.txt)
- [Append Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/append-method/llms-full.txt)
- [Programming Category: Loading, Saving and Database Support](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/load-save/llms-full.txt)

---

## Nearby

- **Previous:** [Append Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/append-method/llms-full.txt)
- **Next:** [AutoBaseLine Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/autobaseline-property/llms-full.txt)
