在启用“文本方向”功能时,获取或设置 Bookmark 控件中的文本方向。
命名空间:  Microsoft.Office.Tools.Word
程序集:  Microsoft.Office.Tools.Word(在 Microsoft.Office.Tools.Word.dll 中)
语法
声明
Property Orientation As WdTextOrientation
    Get
    Set
WdTextOrientation Orientation { get; set; }
属性值
类型:Microsoft.Office.Interop.Word.WdTextOrientation
WdTextOrientation 值之一。
备注
您可能无法使用以上所列的某些常数,具体取决于语言支持(例如,美国英语)。 英语)。
示例
下面的代码示例向第一个段落添加一个带有文本的 Bookmark 控件,并将该书签文本的方向设置为 wdTextOrientationVerticalFarEast。
此示例针对的是文档级自定义项。
Private Sub BookmarkOrientation()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
    Bookmark1.Text = "sample text."
    Bookmark1.Orientation = Word.WdTextOrientation _
        .wdTextOrientationVerticalFarEast
End Sub
private void BookmarkOrientation()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "sample text.";
    bookmark1.Orientation = Word.WdTextOrientation.wdTextOrientationVerticalFarEast;
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。