# PageBorderAttribute Property

> Sets or returns page border attributes of the document or a section: line widths, colors and distances in twips, first page, header and footer options.

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

---

This property returns or sets page border attributes 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.

Introduced: 17.0.

### Syntax

```vbscript
TXTextControl.PageBorderAttribute(Attribute) [= value]
```

### Parameters

| Parameter | Description |
|---|---|
| Attribute | Determines the attribute that is to be changed or returned. Possible values are listed in Constants. |

### Constants

Valid values for the Attribute parameter are:

| Constant | Description |
|---|---|
| txPageBorderLeftBorderWidth (1) | Specifies the width of the page border's left line, in twips. It is zero, if the line is not visible. |
| txPageBorderTopBorderWidth (2) | Specifies the width of the page border's top line, in twips. It is zero, if the line is not visible. |
| txPageBorderRightBorderWidth (3) | Specifies the width of the page border's right line, in twips. It is zero, if the line is not visible. |
| txPageBorderBottomBorderWidth (4) | Specifies the width of the page border's bottom line, in twips. It is zero, if the line is not visible. |
| txPageBorderLeftDistance (5) | Gets or sets the distance, in twips, of the left border line either from the edge of the page or from the text, depending on the **MeasureFromText** attribute. |
| txPageBorderTopDistance (6) | Gets or sets the distance, in twips, of the top border line either from the edge of the page or from the text, depending on the **MeasureFromText** attribute. |
| txPageBorderRightDistance (7) | Gets or sets the distance, in twips, of the right border line either from the edge of the page or from the text, depending on the **MeasureFromText** attribute. |
| txPageBorderBottomDistance (8) | Gets or sets the distance, in twips, of the bottom border line either from the edge of the page or from the text, depending on the **MeasureFromText** attribute. |
| txPageBorderLeftBorderColor (9) | Gets or sets the color of the left border line. |
| txPageBorderTopBorderColor (10) | Gets or sets the color of the top border line. |
| txPageBorderRightBorderColor (11) | Gets or sets the color of the right border line. |
| txPageBorderBottomBorderColor (12) | Gets or sets the color of the bottom border line. |
| txPageBorderOmitFirstPage (13) | Gets or sets a value indicating whether the page border is not drawn on the first page of the section. |
| txPageBorderFirstPageOnly (14) | Gets or sets a value indicating whether the page border is drawn only on the first page of the section. |
| txPageBorderSurroundHeader (15) | Gets or sets a value indicating whether the page border surrounds the section's header. |
| txPageBorderSurroundFooter (16) | Gets or sets a value indicating whether the page border surrounds the section's footer. |
| txPageBorderMeasureFromText (17) | Gets or sets a value indicating whether the page border's distances are measured from the text. |

### Data Types

| Name | Data type |
|---|---|
| txPageBorderLeftBorderWidth | Integer |
| txPageBorderTopBorderWidth | Integer |
| txPageBorderRightBorderWidth | Integer |
| txPageBorderBottomBorderWidth | Integer |
| txPageBorderLeftDistance | Integer |
| txPageBorderTopDistance | Integer |
| txPageBorderRightDistance | Integer |
| txPageBorderBottomDistance | Integer |
| txPageBorderLeftBorderColor | Long |
| txPageBorderTopBorderColor | Long |
| txPageBorderRightBorderColor | Long |
| txPageBorderBottomBorderColor | Long |
| txPageBorderOmitFirstPage | Boolean |
| txPageBorderFirstPageOnly | Boolean |
| txPageBorderSurroundHeader | Boolean |
| txPageBorderSurroundFooter | Boolean |
| txPageBorderMeasureFromText | Boolean |

### Limitations

Run time only.

### See Also

- [SectionCurrent Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sectioncurrent-property/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:** [ObjectWidth Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/objectwidth-property/llms-full.txt)
- **Next:** [PageBreakBefore Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/pagebreakbefore-property/llms-full.txt)
