ParagraphFormat.Duplicate method (Publisher)

Creates a duplicate of the specified ParagraphFormat object and then returns the new ParagraphFormat object.

Syntax

expression.Duplicate

expression A variable that represents a ParagraphFormat object.

Return value

ParagraphFormat

Example

The following example duplicates the paragraph formatting information from the text range in shape one on page one of the active publication and applies it to the text range in shape two.

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

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.