用新段落替换指定区域或选定部分。
注意 应用本方法后,该区域或选定内容将更改为新段落。
expression.InsertParagraph
expression 必需。该表达式返回一个 Range 或 Selection 对象。
如果在使用本方法之前先使用 Collapse 方法,可以不覆盖该区域或所选内容。用 InsertParagraphAfter 方法可在 Range 或 Selection 对象后插入一个新段落。
本示例在活动文档开始处插入一个新段落。
Set myRange = ActiveDocument.Range(0, 0)
With myRange
.InsertParagraph
.InsertBefore "Dear Sirs,"
End With
本示例折叠所选内容,然后在插入点插入段落标记。
With Selection
.Collapse Direction:=wdCollapseStart
.InsertParagraph
.Collapse Direction:=wdCollapseEnd
End With