Styles.Add Method 

Returns a Style object that represents a new user-defined style added to the list of styles.

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

Usage

Dim Name As String
Dim Type As Object
Dim returnValue As Style
Dim styles1 As Styles
returnValue = styles1.Add(Name, Type)

Syntax

Function Add( _
    <InAttribute()> ByVal Name As String, _
    <InAttribute()> Optional ByRef Type As Object _
) As Style
Style Add(
    [In] string Name, 
    [In, Optional] ref object Type
);
public: Style^ Add(
    String^ Name, 
    &Object^ Type
);
public Style Add(
    /*in*/System.String Name, 
    /*in*/System.Object Type
);
function Add(
     Name : String, 
     Type : Object
) : Style;

Parameters

  • Name
    Required String. The string name for the new style.
  • Type
    Optional Object. The style type of the new style. Can be one of the following WdStyleType constants: wdStyleTypeParagraph, wdStyleTypeCharacter, wdStyleTypeList, or wdStyleTypeTable.

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

Styles Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

Styles Members