# HeaderFooterSelect Method

> Selects whether TXTextControl properties and methods manipulate a header, footer or the main text without activating it; 0 returns to automatic selection.

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

---

This method determines whether a certain Text Control property or method manipulates a header or a footer or the main text. The [SectionCurrent](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sectioncurrent-property/llms-full.txt) property determines the section, the header or footer of which is selected. This method does not activate a header or footer.

### Syntax

```vbscript
TXTextControl.HeaderFooterSelect HeaderFooter
```

### Parameters

| Parameter | Description |
|---|---|
| HeaderFooter | Specifies the part of the text that is to be selected. See the Constants section for valid values. |

### Return Value

The method returns True, if a header or footer could be selected, otherwise it returns False.

### Constants

Valid values for the HeaderFooter parameter are:

| Constant | Description |
|---|---|
| 0 | Text Control performs automatic selection, which means that a certain property or method manipulates the text part with the current input position. |
| txHeader (1) | Selects the header. |
| txFirstHeader (2) | Selects the special header for the first page. |
| txFooter (4) | Selects the footer. |
| txFirstFooter (8) | Selects the special footer for the first page. |
| txMainText (16) | Selects the main text. |
| txEvenHeader (128) | Selects the even header. |
| txEvenFooter (256) | Selects the even footer. |

### Data Types

| Name | Data type |
|---|---|
| HeaderFooter | Integer |
| Return value | Boolean |

### Examples

This Basic example selects the header, alters the text of the header and returns to the automatic mode:

```vbscript
TXTextControl1.HeaderFooterSelect txHeader
TXTextControl1.Text = "This is the header's text"
TXTextControl1.HeaderFooterSelect 0
```

### See Also

- [Headers and Footers](https://docs.textcontrol.com/tx-text-control-activex/document-editor/headers-footers/llms-full.txt)
- [Programming Category: Headers and Footers](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/headers-footers/llms-full.txt)

---

## Nearby

- **Previous:** [HeaderFooterPosition Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/headerfooterposition-property/llms-full.txt)
- **Next:** [HeaderFooterStyle Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/headerfooterstyle-property/llms-full.txt)
