Share via


TextRange.Font Property

Returns a ChartFont object that represents character formatting. Read-only.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
ReadOnly Property Font As Font
    Get
'Usage
Dim instance As TextRange
Dim value As Font

value = instance.Font
Font Font { get; }

Property Value

Type: Microsoft.Office.Interop.PowerPoint.Font
Font

Examples

This example sets the formatting for the text in shape one on slide one in the active presentation.

With ActivePresentation.Slides(1).Shapes(1)

    With .TextFrame.TextRange.Font.Size = 48

        .Name = "Palatino"

        .Bold = True

        .Color.RGB = RGB(255, 127, 255)

    End With

End With

This example sets the color and font name for bullets in shape two on slide one.

With ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat.Bullet

        .Visible = True

        With .Font.Name = "Palatino"

            .Color.RGB = RGB(0, 0, 255)

        End With

    End With

End With

See Also

Reference

TextRange Interface

TextRange Members

Microsoft.Office.Interop.PowerPoint Namespace