CopyFormat

Syntax

CopyFormat

Remarks

Copies the character formatting of the first character of the selected text to another text selection. If a paragraph mark is selected, Word copies paragraph formatting in addition to character formatting. For CopyFormat to work, macro instructions

must make a selection immediately before the CopyFormat instruction, make a new selection immediately following CopyFormat, and then use the PasteFormat statement to apply the formatting.

Example

This example copies the character formatting of the first character of the current paragraph (selected using the predefined bookmark "\ Para") to the paragraph immediately above it:


EditGoTo "\Para"
CopyFormat
ParaUp 2
ParaDown 1, 1
PasteFormat

See Also

CopyText, PasteFormat