Skip to content

Latest commit

 

History

History
57 lines (35 loc) · 1.1 KB

Word.Selection.ClearFormatting.md

File metadata and controls

57 lines (35 loc) · 1.1 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Selection.ClearFormatting method (Word)
vbawd10.chm158663665
vbawd10.chm158663665
Word.Selection.ClearFormatting
66c2f088-5d35-f8b0-10e5-2faa0db14d7f
06/08/2017
medium

Selection.ClearFormatting method (Word)

Removes text and paragraph formatting from a selection.

Syntax

expression.ClearFormatting

expression A variable that represents a Selection object.

Example

This example removes all text and paragraph formatting from the active document.

Sub ClrFmtg() 
 ActiveDocument.Select 
 Selection.ClearFormatting 
End Sub

This example removes all text and paragraph formatting from the second through the fourth paragraphs of the active document.

Sub ClrFmtg2() 
 ActiveDocument.Range(Start:=ActiveDocument.Paragraphs(2).Range.Start, _ 
 End:=ActiveDocument.Paragraphs(4).Range.End).Select 
 Selection.ClearFormatting 
End Sub

See also

Selection Object

[!includeSupport and feedback]