Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 1.17 KB

Word.Font.Italic.md

File metadata and controls

57 lines (37 loc) · 1.17 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Font.Italic property (Word)
vbawd10.chm156369027
vbawd10.chm156369027
Word.Font.Italic
adba2e3c-d904-d835-5a1c-c8762d319106
06/08/2017
medium

Font.Italic property (Word)

True if the font or range is formatted as italic. Read/write Long.

Syntax

expression.Italic

expression A variable that represents a Font object.

Remarks

This property returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle.

Example

This example checks the selection for italic formatting and removes any that it finds.

If Selection.Type = wdSelectionNormal Then 
 mySel = Selection.Font.Italic 
 If mySel = wdUndefined or mySel = True Then 
 MsgBox "there is italic text in selection. " _ 
 & "Click OK to remove." 
 Selection.Font.Italic = False 
 Else 
 MsgBox "No italic text in the selection." 
 End If 
Else 
 MsgBox "You need to select some text." 
End If

See also

Font Object

[!includeSupport and feedback]