Selection.CopyFormat Method
Word Developer Reference |
Copies the character formatting of the first character in the selected text.
Syntax
expression.CopyFormat
expression Required. A variable that represents a Selection object.
Remarks
If a paragraph mark is selected, Word copies paragraph formatting in addition to character formatting. You can apply the copied formatting to another selection by using the PasteFormat method.
Example
This example copies the formatting of the first paragraph to the second paragraph in the active document.
Visual Basic for Applications |
---|
|
This example collapses the selection and copies its character formatting to the next word.
Visual Basic for Applications |
---|
|
See Also