Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.68 KB

Project.shape.texteffect.md

File metadata and controls

62 lines (40 loc) · 1.68 KB
title ms.service ms.assetid ms.date ms.localizationpriority
Shape.TextEffect property (Project)
project-server
12fa0951-e3a5-807e-bebb-bff82650d200
06/08/2017
medium

Shape.TextEffect property (Project)

Gets text formatting properties for the shape. Read-only TextEffectFormat.

Syntax

expression.TextEffect

expression A variable that represents a Shape object.

Example

The following example sets the foreground color of text in a text frame to red, the foreground color of the text box shape to a yellowish tan, and then uses the TextEffect property to set font properties.

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

Property value

TEXTEFFECTFORMAT

See also

Shape Object ShapeRange.TextEffect Property TextEffectFormat

[!includeSupport and feedback]