InsertBefore Method

See Also         Example         Applies To

Inserts the specified text before the specified selection or range. After the text is inserted, the selection or range is expanded to include the new text. If the selection or range is a bookmark, the bookmark is also expanded to include the next text.

Note   You can insert characters such as quotation marks, tab characters, and nonbreaking hyphens by using the Chr function with the InsertBefore method. You can also use the following Visual Basic constants: vbCr, vbLf, vbCrLf and vbTab.

Syntax

expression.InsertBefore(Text)

expression   Required. An expression that returns a Range or Selection object.

Text   Required String. The text to be inserted.