PowerPoint (的 AxisTitle 物件)

代表圖表座標軸標題。

註解

使用 AxisTitle 屬性可傳回 AxisTitle 物件。

AxisTitle 物件才存在,並不能將座標軸的 HasTitle 屬性設定為 True

範例

注意事項

[!注意事項] 雖然下列程式碼適用於 Microsoft Word,但是您可以輕易對其進行修改以套用至 PowerPoint。

下列範例會設定標題,並將字型設為 Bookman 10 點,然後設定單字 "millions" 的格式為斜體,以做為使用中文件內第一張圖表之數值座標軸的座標軸標題。

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


另請參閱

PowerPoint 物件模型參考資料

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應