DocumentBase.TextLineEnding 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个 WdLineEndingType 常数,该常数指示 Microsoft Office Word 如何在另存为文本文件的文档中标记分行符和换段符。
public Microsoft.Office.Interop.Word.WdLineEndingType TextLineEnding { get; set; }
属性值
WdLineEndingType 值之一。
示例
下面的代码示例将文档设置为在将文档另存为文本文件时为行和段落分行输入回车符。 若要使用此示例,请在 ThisDocument 文档级项目的类中运行它。
private void DocumentTextLineEnding()
{
this.TextLineEnding = Word.WdLineEndingType.wdCROnly;
}
Private Sub DocumentTextLineEnding()
Me.TextLineEnding = Word.WdLineEndingType.wdCROnly
End Sub