TxtSaveOptionsSaveFormat Property

Specifies the format in which the document will be saved if this save options object is used. Can only be Text.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public override SaveFormat SaveFormat { get; set; }

Property Value

Type: SaveFormat
Examples
Shows how to save a .txt document with a custom paragraph break.
// Create a new document and add some paragraphs
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Paragraph 1.");
builder.Writeln("Paragraph 2.");
builder.Write("Paragraph 3.");

// When saved to plain text, the paragraphs we created can be separated by a custom string
TxtSaveOptions txtSaveOptions = new TxtSaveOptions { SaveFormat = SaveFormat.Text, ParagraphBreak = " End of paragraph.\n\n\t" };

doc.Save(ArtifactsDir + "TxtSaveOptions.ParagraphBreak.txt", txtSaveOptions);
See Also