DocumentBase.TextLineEnding 属性

定义

获取或设置一个 WdLineEndingType 常数,该常数指示 Microsoft Office Word 如何在另存为文本文件的文档中标记分行符和换段符。

public Microsoft.Office.Interop.Word.WdLineEndingType TextLineEnding { get; set; }

属性值

WdLineEndingType

WdLineEndingType 值之一。

示例

下面的代码示例将文档设置为在将文档另存为文本文件时为行和段落分行输入回车符。 若要使用此示例,请在 ThisDocument 文档级项目的类中运行它。

private void DocumentTextLineEnding()
{
    this.TextLineEnding = Word.WdLineEndingType.wdCROnly;
}
Private Sub DocumentTextLineEnding()
    Me.TextLineEnding = Word.WdLineEndingType.wdCROnly
End Sub 

适用于