Selection.CreateAutoTextEntry Method

Adds a new AutoTextEntry object to the AutoTextEntries collection, based on the current selection.

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

Syntax

'Declaration
Function CreateAutoTextEntry ( _
    Name As String, _
    StyleName As String _
) As AutoTextEntry
'Usage
Dim instance As Selection
Dim Name As String
Dim StyleName As String
Dim returnValue As AutoTextEntry

returnValue = instance.CreateAutoTextEntry(Name, _
    StyleName)
AutoTextEntry CreateAutoTextEntry(
    string Name,
    string StyleName
)

Parameters

  • Name
    Type: System.String
    Required String. The text the user must type to call the new AutoText entry.
  • StyleName
    Type: System.String
    Required String. The category in which the new AutoText entry will be listed on the AutoText menu.

Return Value

Type: Microsoft.Office.Interop.Word.AutoTextEntry

See Also

Reference

Selection Interface

Selection Members

Microsoft.Office.Interop.Word Namespace