ListFormatRemoveNumbers Method |
Namespace: Aspose.Words
Calling this method is equivalent to setting the List property to null.
Body body = doc.FirstSection.Body; foreach (Paragraph paragraph in body.Paragraphs.OfType<Paragraph>()) paragraph.ListFormat.RemoveNumbers();
DocumentBuilder builder = new DocumentBuilder(); builder.Writeln("Aspose.Words allows:"); builder.Writeln(); // Start a numbered list with default formatting builder.ListFormat.ApplyNumberDefault(); builder.Writeln("Opening documents from different formats:"); // Go to second list level, add more text builder.ListFormat.ListIndent(); builder.Writeln("DOC"); builder.Writeln("PDF"); builder.Writeln("HTML"); // Outdent to the first list level builder.ListFormat.ListOutdent(); builder.Writeln("Processing documents"); builder.Writeln("Saving documents in different formats:"); // Indent the list level again builder.ListFormat.ListIndent(); builder.Writeln("DOC"); builder.Writeln("PDF"); builder.Writeln("HTML"); builder.Writeln("MHTML"); builder.Writeln("Plain text"); // Outdent the list level again builder.ListFormat.ListOutdent(); builder.Writeln("Doing many other things!"); // End the numbered list builder.ListFormat.RemoveNumbers(); builder.Writeln(); builder.Writeln("Aspose.Words main advantages are:"); builder.Writeln(); // Start a bulleted list with default formatting builder.ListFormat.ApplyBulletDefault(); builder.Writeln("Great performance"); builder.Writeln("High reliability"); builder.Writeln("Quality code and working"); builder.Writeln("Wide variety of features"); builder.Writeln("Easy to understand API"); // End the bulleted list builder.ListFormat.RemoveNumbers(); builder.Document.Save(ArtifactsDir + "Lists.ApplyDefaultBulletsAndNumbers.doc");