Paragraphs.Add method (Word)
Returns a Paragraph object that represents a new, blank paragraph added to the document. When the caller is not the last paragraph in a document, Paragraph adds a new, blank paragraph at the insertion point. When adding a paragraph to the very end, the insertion point will be before the last paragraph, and thus the new paragraph will be inserted as the second-to-last.
Syntax
expression.Add (Range)
expression Required. A variable that represents a 'Paragraphs' collection.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Range | Optional | Variant | The range before which you want the new paragraph to be added. The new paragraph doesn't replace the range. |
Return value
Paragraph
Remarks
If Range isn't specified, the new paragraph is added after the selection or range or at the end of the document, depending on expression.
Example
This example adds a paragraph after the selection.
Selection.Paragraphs.Add
This example adds a paragraph mark before the first paragraph in the selection.
Selection.Paragraphs.Add Range:=Selection.Paragraphs(1).Range
This example adds a paragraph mark before the second paragraph in the active document.
ActiveDocument.Paragraphs.Add _
Range:=ActiveDocument.Paragraphs(2).Range
This example adds a new paragraph mark at the end of the active document.
ActiveDocument.Paragraphs.Add
See also
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.