# PageWidth Property

> Sets or returns the page width of the document or a section in twips, at most 32767; returns -1 when the sections selected through SectionCurrent differ.

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

---

Returns or sets the width of the page for the whole document or for a document's section. The [SectionCurrent](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sectioncurrent-property/llms-full.txt) property determines the part of the document. The property returns -1, if more than one section is specified through the [SectionCurrent](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sectioncurrent-property/llms-full.txt) property and these sections' pages have a different width.

### Syntax

```vbscript
TXTextControl.PageWidth [= value]
```

### Data Types

Long.

### Examples

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

### Remarks

The width of the actual printed area is PageWidth minus [PageMarginL](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagemarginl-property/llms-full.txt) minus [PageMarginR](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagemarginr-property/llms-full.txt). The maximum value depends on the capabilities of the selected printer and must not exceed 32767 [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips).

### See Also

- [PageHeight Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pageheight-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: Sections and Pages](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/sections-pages/llms-full.txt)

---

## Nearby

- **Previous:** [PageViewStyle Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pageviewstyle-property/llms-full.txt)
- **Next:** [ParagraphChange Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/paragraphchange-event/llms-full.txt)
