Replaces the text adjacent to the element.

## Syntax

```
retVal = object.replaceAdjacentText(where, newText);

```

## Parameters

where [in]

Type: BSTR

A BSTR that specifies where to locate the replacement text, using one of the following values.

beforeBegin

Replaces text immediately before the element.

afterBegin

Replaces text after the start of the element, but before all other content in the element.

beforeEnd

Replaces text immediately before the end of the element, but after all other content in the element.

afterEnd

Replaces text immediately after the end of the element.

newText [in]

Type: BSTR

A BSTR that specifies the replacement text.

## Standards information

There are no standards that apply here.