# CurrentPages Property

> Returns the number of pages of the current document, which depends on the text and the PageHeight, PageWidth and page margin properties; read only.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > CurrentPages Property
- **263 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/currentpages-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/currentpages-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/currentpages-property/llms-full.txt

---

Returns the number of pages contained in the current document.

### Syntax

```vbscript
TXTextControl.CurrentPages
```

### Data Types

Long.

### Examples

See [PrintPage](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printpage-method/llms-full.txt) method example.

### Limitations

Read only, run time only.

### Remarks

The value of this property depends on the size of the text as well as on the settings of the [PageHeight](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pageheight-property/llms-full.txt), [PageWidth](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagewidth-property/llms-full.txt) and [PageMarginx](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagemarginb-property/llms-full.txt) properties.

### See Also

- [PageHeight Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pageheight-property/llms-full.txt)
- [PageWidth Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagewidth-property/llms-full.txt)
- [PageMarginx Properties](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagemarginb-property/llms-full.txt)
- [PrintDevice Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printdevice-property/llms-full.txt)
- [PrintPage Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/printpage-method/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:** [CurrentInputPosition Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/currentinputposition-property/llms-full.txt)
- **Next:** [DataText Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/datatext-property/llms-full.txt)
