ListFieldURL Object


Contains information about the Microsoft FrontPage field used to display URLs. The ListFieldURL object allows you to customize the way URLs appear in the list fields. The URL can be displayed as an image or as a link. Use the DisplayFormat property to change the view settings.
This object is supported only by Web pages or sites that are based on Microsoft SharePoint Services.
Using the ListFieldURL object
Use ListFields.Item (index), where index is the name or ordinal position of a field of type fpField URL, to return a single ListFieldURL object.
The following example creates a new field of type fpFieldURL and displays the name of the new field and the name of the list into which it was inserted.
Sub CreateURLField()
'Add new URL field
Dim objApp As FrontPage.Application
Dim objLstFlds As ListFields
Dim strName As String
Set objApp = FrontPage.Application
Set objLstFlds = objApp.ActiveWeb.Lists.Item(0).Fields
strName = "Location"
'Add new Field of type fpFieldURL to list
objLstFlds.Add Name:=strName, Description:="Displays file locations", _
Fieldtype:=fpFieldURL
MsgBox "A new field named " & strName & " was added to the list " & _
objApp.ActiveWeb.Lists.Item(0).Name & "."
End Sub