Font.Duplicate method (Publisher)

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

Syntax

expression.Duplicate

expression A variable that represents a Font object.

Return value

Font

Example

The following example duplicates the character 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 fntTemp As Font 
 
With ActiveDocument.Pages(1) 
 Set fntTemp = _ 
 .Shapes(1).TextFrame.TextRange.Font.Duplicate 
 .Shapes(2).TextFrame.TextRange.Font = fntTemp 
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.