Udostępnij za pośrednictwem


Document.TextLineEnding Property (2007 System)

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.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
Public Property TextLineEnding As WdLineEndingType
'Usage
Dim instance As Document 
Dim value As WdLineEndingType 

value = instance.TextLineEnding

instance.TextLineEnding = value
public WdLineEndingType TextLineEnding { get; set; }
public:
property WdLineEndingType TextLineEnding {
    WdLineEndingType get ();
    void set (WdLineEndingType value);
}
public function get TextLineEnding () : WdLineEndingType 
public function set TextLineEnding (value : WdLineEndingType)

Property Value

Type: WdLineEndingType
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.

This example is for a document-level customization.

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

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace