Expand Minimize

DocumentBase.TextLineEnding Property

Gets or sets a WdLineEndingType constant indicating how Microsoft Office Word marks the line and paragraph breaks in documents saved as text files.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public WdLineEndingType TextLineEnding { get; set; }

The following code example sets the document to enter a carriage return for line and paragraph breaks when the document is saved as a text file. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentTextLineEnding()
{
    this.TextLineEnding = Word.WdLineEndingType.wdCROnly;
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft