Document Solutions for Word
DS.Documents.Word Assembly / GrapeCity.Documents.Word.Fields Namespace / TocStyleLevelCollection Class / Add Method
The style name.
The outline level on which to display the collected paragraphs in the TOC field result.

In This Topic
    Add Method (TocStyleLevelCollection)
    In This Topic
    Adds the specified style to the collection.
    Syntax
    'Declaration
     
    Public Function Add( _
       ByVal name As System.String, _
       ByVal displayLevel As OutlineLevel _
    ) As TocStyleLevel
    public TocStyleLevel Add( 
       System.string name,
       OutlineLevel displayLevel
    )

    Parameters

    name
    The style name.
    displayLevel
    The outline level on which to display the collected paragraphs in the TOC field result.

    Return Value

    The newly created TocStyleLevel instance.
    Exceptions
    ExceptionDescription
    Thrown when name is a null reference (Nothing in Visual Basic) or an empty string.
    Thrown when the style with the given name already exist in the collection.
    See Also