Partager via


ChartFont.Background Property (PowerPoint)

Returns or sets the type of background for text used in charts. Read/write Variant that is set to one of the constants of XlBackground.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Background

expression A variable that represents a ChartFont object.

Example

Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds a chart title to the first chart in the active document and then sets the font size and specifies a transparent background for the title.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .HasTitle = True

            .ChartTitle.Text = "Rainfall Totals by Month"

            With .ChartTitle.Font

                .Size = 10

                .Background = xlBackgroundTransparent

            End With

        End With

    End If

End With

See Also

Concepts

ChartFont Object

ChartFont Object Members