DocumentBase.TextLineEnding Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a WdLineEndingType constant indicating how Microsoft Office Word marks the line and paragraph breaks in documents saved as text files.
public Microsoft.Office.Interop.Word.WdLineEndingType TextLineEnding { get; set; }
Property Value
One of the WdLineEndingType values.
Examples
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;
}
Private Sub DocumentTextLineEnding()
Me.TextLineEnding = Word.WdLineEndingType.wdCROnly
End Sub