Condividi tramite


NamedRange.Orientation Property

Definition

Gets or sets the text orientation.

public:
 property System::Object ^ Orientation { System::Object ^ get(); void set(System::Object ^ value); };
public object Orientation { get; set; }
member this.Orientation : obj with get, set
Public Property Orientation As Object

Property Value

An integer value in the range of -90 to 90 degrees.

Examples

The following code example creates a NamedRange and then uses the Orientation property to display vertical text in the NamedRange.

This example is for a document-level customization.

Microsoft.Office.Tools.Excel.NamedRange orientationRange;
private void DisplayVerticalText()
{
    orientationRange = this.Controls.AddNamedRange(
         this.Range["C4"], "orientationRange");
    this.orientationRange.Value2 = "This text is vertical.";
    this.orientationRange.Orientation = -90;
}
Private orientationRange As Microsoft.Office.Tools.Excel.NamedRange

Private Sub DisplayVerticalText()
    orientationRange = Me.Controls.AddNamedRange( _
        Me.Range("C4"), "orientationRange")
    Me.orientationRange.Value2 = "This text is vertical."
    Me.orientationRange.Orientation = -90
End Sub

Applies to