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)

Usage

Dim Style As Object
Dim Level As Short
Dim returnValue As HeadingStyle
Dim headingStyles1 As HeadingStyles
returnValue = headingStyles1.Add(Style, Level)

Syntax

Function Add( _
    <InAttribute()> ByRef Style As Object, _
    <InAttribute()> ByVal Level As Short _
) As HeadingStyle
HeadingStyle Add(
    [In] ref object Style, 
    [In] short Level
);
public: HeadingStyle^ Add(
    &Object^ Style, 
    Int16 Level
);
public HeadingStyle Add(
    /*in*/System.Object Style, 
    /*in*/short Level
);
function Add(
     Style : Object, 
     Level : Int16
) : HeadingStyle;

Parameters

  • Style
    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
    Required Short. A number that represents the level of the heading.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

HeadingStyles Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

HeadingStyles Members