ListFieldMultiLine Object

Microsoft FrontPage Visual Basic

ListFieldMultiLine Object

ListFieldMultiLine Web

Contains information about the field used to display information containing more than one line of text. For example, the ListFieldMultiLine object can be used to display descriptions and summaries, which often require more than a single line.

This object is supported only by Web pages or sites that are based on Microsoft SharePoint Services.

Using the ListFieldMultiLine object

Use ListFields.Item (index), where index is the name or ordinal position of a field of type fpFieldMultiLine, to return a single ListFieldMultiLine object.

Use the ListFields.Add method to add a field of type fpFieldMultiLine to the ListFields collection.

The following example adds a new field named Description of type fpFieldMultiLine to the ListFields collection. The subroutine displays the name of the new field as well as the number of lines it will contain.

Sub CreateMultiLine()
'Add new MultiLine Field
    Dim objApp As FrontPage.Application
    Dim objLstFlds As ListFields
    Dim objLstFldMulti As ListFieldMultiLine
    Dim strName As String

    Set objApp = FrontPage.Application
    Set objLstFlds = objApp.ActiveWeb.Lists.Item(0).Fields
    strName = "Description"
    'Add new Field of type fpFieldMultiLine to list
    objLstFlds.Add Name:=strName, Description:="Description Field", _
                   Fieldtype:=fpFieldMultiLine
    Set objLstFldMulti = objLstFlds.Item(strName)
    MsgBox "A new field named " & strName & " was added to the list " & _
           objApp.ActiveWeb.Lists.Item(0).Name & ". It contains " & _
           objLstFldMulti.NumberOfLines & " lines."

End Sub