ParagraphFormat.Duplicate 方法 (Publisher)

创建指定的 ParagraphFormat 对象的副本,然后返回新的 ParagraphFormat 对象。

语法

表达式重复

表达 一个代表 ParagraphFormat 对象的变量。

返回值

ParagraphFormat

示例

以下示例复制活动出版物的第一页上的第一个形状中文本范围的段落格式信息,并将其应用到第二个形状中的文本范围。

Dim pfTemp As ParagraphFormat 
 
With ActiveDocument.Pages(1) 
 Set pfTemp = .Shapes(1).TextFrame _ 
 .TextRange.ParagraphFormat.Duplicate 
 .Shapes(2).TextFrame _ 
 .TextRange.ParagraphFormat = pfTemp 
End With

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。