[Root] / Xceed.Document.NET Assembly / Xceed.Document.NET Namespace / HeadingSplitOptions Class
Example


In This Topic
    HeadingSplitOptions Class
    In This Topic
    Splits the Document at heading paragraphs.
    Syntax
    'Declaration
     
    
    Public Class HeadingSplitOptions 
       Inherits SplitOptions
    'Usage
     
    
    Dim instance As HeadingSplitOptions
    public class HeadingSplitOptions : SplitOptions 
    Remarks
    By default, splits only at Heading1.
    Example
    var options = new HeadingSplitOptions
    {
        HeadingLevel = 2,                      // Splits at Heading 1 and Heading 2
        CustomHeadingStyleIds = { "Chapter" }, // Also splits at custom styles
        UseHeadingTextAsDocumentName = true    // Names output documents dynamically
    };
    
    var documents = DocX.Split(doc, options);
    Inheritance Hierarchy

    System.Object
       Xceed.Document.NET.SplitOptions
          Xceed.Document.NET.HeadingSplitOptions

    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public PropertyOverridden. Gets the SplitCriteria used by the split operation.  
    Public Property  
    Public PropertyGets the maximum heading level used as a reference for the split operation.  
    Public PropertyGets or sets if the element matching the SplitCriteria will become the first element of the new Document. (Inherited from Xceed.Document.NET.SplitOptions)
    Public Property (Inherited from Xceed.Document.NET.SplitOptions)
    Public PropertyGets or sets if header & footer references, as well as the other properties from the original Document's sections, are preserved on every resulting Document. (Inherited from Xceed.Document.NET.SplitOptions)
    Public Property

    Gets or sets if Documents containing no real content will be discarded from the returned list.

    (Inherited from Xceed.Document.NET.SplitOptions)
    Public PropertyGets or sets the optional non-contiguous list of heading levels at which the Document will be split.  
    Public Property  
    Top
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also