# SaveDialog Method

> Opens the system Save As dialog box with format filters such as DOCX, PDF and RTF and options for PDF passwords, HTML stylesheets and saving only the selection.

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

---

Opens the system 'Save As' dialog box and saves a document as specified.

Introduced: 31.0.

### Syntax

```vbscript
TXTextControl.SaveDialog Filters, DialogOptions[, 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: |
| DialogOptions | Specifies additional options displayed in the dialog box. The values listed below can be added to set more than one option. |
| CurSelection | Optional. When set to True the current selection is saved. When omitted or set to False or when no selection exists all the control contents are saved. |

#### 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) |
| AdobePDF (&H200) | Adobe Portable Document Format |
| MSWord (&H400) | Microsoft Word format (.docx) |
| AdobePDFA (&H800) | Adobe Portable Document Format Archive |
| All (&H1FFF) | All saveable formats |

#### DialogOptions

| Constant | Description |
|---|---|
| txNone (0) | The dialogbox does not show additional options. |
| txPassword (1) | PDF only: The dialogbox offers a button which opens a dialogbox to specify an encryption password. This button is shown only, if the user selects **Adobe PDF** or **Adobe PDF/A** as the file format to save the document. |
| txCSSOptions (2) | HTML only: The dialogbox offers buttons to specify how to save formatting styles: Inline or in a separate file. These buttons are shown only, if the user selects **Hypertext Markup Language** as the file format to save the document. |
| txSaveSelection (4) | The dialogbox offers a checkbox indicating that only the currently selected text is saved. This checkbox is shown only, if a text selection exists when the dialogbox is opened. |

### Return Value

This method has no return value.

### Data Types

| Name | Data type |
|---|---|
| Filters | Long |
| DialogOptions | 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:** [Save Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/save-method/llms-full.txt)
- **Next:** [SaveToMemory Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/savetomemory-method/llms-full.txt)
