Share via


Font.Duplicate Property (Word)

Returns a read-only Font object that represents the character formatting of the specified font.

Syntax

expression .Duplicate

expression Required. A variable that represents a Font object.

Remarks

You can use the Duplicate property to pick up the settings of all the properties of a duplicated Font object. You can assign the object returned by the Duplicate property to another Font object to apply those settings all at once. Before assigning the duplicate object to another object, you can change any of the properties of the duplicate object without affecting the original.

Example

This example sets the variable MyDupFont to the character formatting of the selection, removes bold formatting from MyDupFont, and adds italic formatting to it instead. The example also creates a new document, inserts text into it, and then applies the formatting stored in MyDupFont to the text.

Set myDupFont = Selection.Font.Duplicate 
With myDupFont 
 .Bold = False 
 .Italic = True 
End With 
Documents.Add 
Selection.InsertAfter "This is some text." 
Selection.Font = myDupFont

See Also

Concepts

Font Object

Font Object Members