共用方式為


Shape.TextEffect 屬性 (Project)

取得圖形的文字格式設定屬性。 唯讀 的 TextEffectFormat

語法

運算式TextEffect

表達 代表 Shape 物件的變數。

範例

下列範例會將文字圖文框中文字的前景色彩設定為紅色,將文字方塊圖案的前景色彩設定為黃色,然後使用 TextEffect 屬性來設定字型屬性。

Sub FormatTextBox()
    Dim theReport As Report
    Dim textShape As shape
    Dim reportName As String
    
    reportName = "Textbox report"
    
    Set theReport = ActiveProject.Reports.Add(reportName)
    Set textShape = theReport.Shapes.AddTextbox(msoTextOrientationHorizontal, 30, 50, 350, 80)
    
    textShape.TextFrame2.TextRange.Text = "This is a test. It's only a test. "
    textShape.TextFrame2.TextRange.Characters.Font.Fill.ForeColor.RGB = &H2020CC
    textShape.Fill.ForeColor.RGB = &H88CCCC
    
    With textShape.TextEffect
        .FontName = "Courier New"
        .FontBold = True
        .FontItalic = True
        .FontSize = 28
    End With
End Sub

屬性值

TEXTEFFECTFORMAT

另請參閱

Shape 物件ShapeRange.TextEffect 屬性TextEffectFormat

支援和意見反應

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