Share via


_OlkListBox.AddItem Method

Adds an item to the list, optionally specifying an index for the new item to appear in the list.

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

Syntax

'Declaration
<DispIdAttribute()> _
Sub AddItem ( _
    ItemText As String, _
    Index As Object _
)
'Usage
Dim instance As _OlkListBox
Dim ItemText As String
Dim Index As Object

instance.AddItem(ItemText, Index)
[DispIdAttribute()]
void AddItem(
    string ItemText,
    Object Index
)

Parameters

  • ItemText
    Type: System.String

    Value to be added to the list in the list box control.

  • Index
    Type: System.Object

    A 0-based value that specifies the order of the new item in the list.

Remarks

If the value of Index is equal to or larger than the number of elements in the list, the new item will be added to the end of the list.

See Also

Reference

_OlkListBox Interface

_OlkListBox Members

Microsoft.Office.Interop.Outlook Namespace