Share via


NamedRange.Orientation Property (2007 System)

Gets or sets the text orientation.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property Orientation As Object
'Usage
Dim instance As NamedRange 
Dim value As Object 

value = instance.Orientation

instance.Orientation = value
[BrowsableAttribute(false)]
public Object Orientation { get; set; }
[BrowsableAttribute(false)]
public:
property Object^ Orientation {
    Object^ get ();
    void set (Object^ value);
}
public function get Orientation () : Object 
public function set Orientation (value : Object)

Property Value

Type: System.Object
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.

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
Microsoft.Office.Tools.Excel.NamedRange orientationRange;
private void DisplayVerticalText()
{
    orientationRange = this.Controls.AddNamedRange(
         this.Range["C4", missing], "orientationRange");
    this.orientationRange.Value2 = "This text is vertical.";
    this.orientationRange.Orientation = -90;
}

.NET Framework Security

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace