# LoadDialog Method

> Opens the system Open dialog box with filters for RTF, HTML, DOC, DOCX, XLSX, XML, CSS and text and loads the selected document. Needs at least Windows Vista.

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

---

Opens the system 'Open' dialog box and loads a document as specified.

Introduced: 31.0.

### Syntax

```vbscript
TXTextControl.LoadDialog Filters[, CurSelection]
```

### Parameters

| Parameter | Description |
|---|---|
| Filters | Defines the filters which the dialog box offers to select a file format. The values listed below can be added to set more than one filter: |
| CurSelection | Optional. When set to true the loaded data replaces the current selection or is inserted at the current input position. The new input position is behind the inserted data. When omitted or set to false the loaded data replaces the complete control contents independent of the current selection. The new input position is at the beginning of the data. |

#### Filters

| Constant | Description |
|---|---|
| AnsiText (&H1) | Text only (ANSI) |
| HTML (&H4) | HTML format (Hypertext Markup Language) |
| RTF (&H8) | RTF format (Rich Text Format) |
| UnicodeText (&H10) | Text only (Unicode) |
| TXFormat (&H20) | Internal TX Text Control format |
| MSWord97\_2003 (&H40) | Microsoft Word 97-2003 format (.doc) |
| XML (&H80) | XML format (Extensible Markup Language) |
| CSS (&H100) | CSS format (Cascading Style Sheet) |
| MSWord (&H400) | Microsoft Word format (.docx) |
| SpreadsheetML (&H1000) | SpreadsheetML format (.xlsx) |
| All (&H1FFF) | All loadable formats |
| AllFormats (&H8000) | Constructs an 'All Formats' item from the specified filters and adds it to the dialog box. |

### Return Value

This method has no return value.

### Data Types

| Name | Data type |
|---|---|
| Filters | Long |
| CurSelection | Boolean |

### Limitations

Needs at least Windows Vista.

### See Also

- [PDF Export](https://docs.textcontrol.com/tx-text-control-activex/pdf/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)
- [Programming Category: Built-in Dialog Boxes](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/dialog-boxes/llms-full.txt)

---

## Nearby

- **Previous:** [Load Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/load-method/llms-full.txt)
- **Next:** [LoadFromMemory Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/loadfrommemory-method/llms-full.txt)
