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)

Syntax

'Declaration
Function Add ( _
    Name As String, _
    ByRef Type As Object _
) As Style
'Usage
Dim instance As Styles
Dim Name As String
Dim Type As Object
Dim returnValue As Style

returnValue = instance.Add(Name, Type)
Style Add(
    string Name,
    ref Object Type
)

Parameters

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

Return Value

Type: Microsoft.Office.Interop.Word.Style

See Also

Reference

Styles Interface

Styles Members

Microsoft.Office.Interop.Word Namespace