Range.InsertBefore method (Word)

Inserts the specified text before the specified range.


expression. InsertBefore( _Text_ )

expression Required. A variable that represents a Range object.


Name Required/Optional Data type Description
Text Required String The text to be inserted.


After the text is inserted, the range is expanded to include the new text. If the range is a bookmark, the bookmark is also expanded to include the next text.

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


This example inserts the text "Introduction" as a separate paragraph at the beginning of the active document.

With ActiveDocument.Content 
 .InsertBefore "Introduction" 
End With

See also

Range Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.