HeadingStyles.Add Method

Returns a HeadingStyle object that represents a new heading style added to a document. The new heading style will be included whenever you compile a table of contents or table of figures.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function Add ( _
    ByRef Style As Object, _
    Level As Short _
) As HeadingStyle
'Usage
Dim instance As HeadingStyles
Dim Style As Object
Dim Level As Short
Dim returnValue As HeadingStyle

returnValue = instance.Add(Style, Level)
HeadingStyle Add(
    ref Object Style,
    short Level
)

Parameters

  • Style
    Type: System.Object%
    Required Object. The style you want to add. You can specify this argument by using either the string name for the style or a Style object.
  • Level
    Type: System.Int16
    Required Short. A number that represents the level of the heading.

Return Value

Type: Microsoft.Office.Interop.Word.HeadingStyle

See Also

Reference

HeadingStyles Interface

HeadingStyles Members

Microsoft.Office.Interop.Word Namespace