Export (0) Print
Expand All
Expand Minimize

Selection.PasteFormat Method (Word)

Applies formatting copied with the CopyFormat method to the selection.

expression .PasteFormat

expression Required. A variable that represents a Selection object.

If a paragraph mark was selected when the CopyFormat method was used, Word applies paragraph formatting in addition to character formatting.

This example copies the paragraph and character formatting from the first paragraph in the selection to the next paragraph in the selection.

With Selection 
 .Paragraphs(1).Range.Select 
 .CopyFormat 
 .Paragraphs(1).Next.Range.Select 
 .PasteFormat 
End With

This example collapses the selection and copies the character formatting to the next word.

With Selection 
 .Collapse Direction:=wdCollapseStart 
 .CopyFormat 
 .Next(Unit:=wdWord, Count:=1).Select 
 .PasteFormat 
End With
Show:
© 2014 Microsoft