Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets or sets the text orientation.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Property Orientation As Object
Get
Set
Object Orientation { get; set; }
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.