Table of contents
TOC
折叠目录
展开目录

AxisTitle 对象 (PowerPoint)AxisTitle Object (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

代表图表坐标轴标题。Represents a chart axis title.

注解Remarks

使用AxisTitle属性返回一个AxisTitle对象。Use the AxisTitle property to return an AxisTitle object.

AxisTitle对象不存在,除非轴HasTitle属性为True,否则无法使用。The AxisTitle object does not exist and cannot be used unless the HasTitle property for the axis is True.

示例Example

请注意 尽管下面的代码适用于 Microsoft Word 中,您可以随时修改将其应用到 PowerPoint。Note Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

以下示例对活动文档中第一个图表的数值轴的轴标题进行如下设置:设置标题、将字体设置为 Bookman 10 磅、将单词“millions”的格式设置为斜体。The following example sets the caption, sets the font to Bookman 10 point, and formats the word "millions" as italic for the axis title of the value axis for the first chart in the active document.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .HasTitle = True

            With .AxisTitle

                .Caption = "Revenue (millions)"

                .Font.Name = "bookman"

                .Font.Size = 10

                .Characters(10, 8).Font.Italic = True

            End With

        End With

    End If

End With

另请参阅See also

概念Concepts

PowerPoint 对象模型引用PowerPoint Object Model Reference

© 2018 Microsoft