段落对象 (Word)Paragraph object (Word)

代表所选内容、范围或文档中的一个段落。Represents a single paragraph in a selection, range, or document. Paragraph 对象是 Paragraphs 集合的一个成员。The Paragraph object is a member of the Paragraphs collection. Paragraphs 集合包含所选内容、范围或文档中的所有段落。The Paragraphs collection includes all the paragraphs in a selection, range, or document.

说明Remarks

使用 Paragraphs (Index) 可返回一个 Paragraph 对象,其中 Index 为索引号。Use Paragraphs (Index), where Index is the index number, to return a single Paragraph object. 以下示例将活动文档中的第一段右对齐。The following example right aligns the first paragraph in the active document.

ActiveDocument.Paragraphs(1).Alignment = wdAlignParagraphRight

使用 AddInsertParagraphInsertParagraphAfterInsertParagraphBefore 方法可在文档中添加一个新的空白段落。Use the Add, InsertParagraph, InsertParagraphAfter, or InsertParagraphBefore method to add a new, blank paragraph to a document. 以下示例在所选内容的第一段前添加一个段落标记。The following example adds a paragraph mark before the first paragraph in the selection.

Selection.Paragraphs.Add Range:=Selection.Paragraphs(1).Range

以下示例同样在所选内容的第一段前添加一个段落标记。The following example also adds a paragraph mark before the first paragraph in the selection.

Selection.Paragraphs(1).Range.InsertParagraphBefore

另请参阅See also

Word 对象模型参考Word Object Model Reference

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.