# PrintDoc Method

> Prints the document or a range of pages on the default printer or the device set through PrintDevice, with a print job name and the number of copies.

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

---

Prints a Text Control document or a part of a Text Control document on the default printer.

### Syntax

```vbscript
TXTextControl.PrintDoc DocName, FirstPage, LastPage, Copies
```

### Parameters

| Parameter | Description |
|---|---|
| DocName | Specifies the name of the document used for the print job. |
| FromPage | Specifies the first page to print. |
| ToPage | Specifies the last page to print. |
| Copies | Specifies the number of copies to print. |

### Return Value

This method has no return value.

### Data Types

| Name | Data type |
|---|---|
| DocName | String |
| FromPage | Integer |
| ToPage | Integer |
| Copies | Integer |

### Remarks

Prior to using this method the Text Control's output device can be selected using the [PrintDevice](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printdevice-property/llms-full.txt) property. If this property is not used Text Control prints to the printer, for which the document is currently formatted.

### See Also

- [PrintPage Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printpage-method/llms-full.txt)
- [PrintDevice Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printdevice-property/llms-full.txt)
- [Programming Category: Printing and Print Preview](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/printing/llms-full.txt)

---

## Nearby

- **Previous:** [PrintDialog Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printdialog-method/llms-full.txt)
- **Next:** [PrintOffset Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printoffset-property/llms-full.txt)
