NewForm Property

       

Returns or sets a String that represents the form used for adding new content to the current list in Microsoft FrontPage. Read/write.

expression.NewForm

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

The default file name for the BasicList and Survey objects is NewForm.htm. The default filename for the DocumentLibrary is Upload.htm.

Example

The following example displays the name of each list in the active web and the relative URLs of their associated New form pages. If the active web contains no lists, a message is displayed to the user.

Sub ViewNewFormURL()
'Display the URL of the form
'associated with adding new content

    Dim lstWebList As List
    Dim strURL As String

    If Not ActiveWeb.Lists Is Nothing Then
        'Cycle through lists and add URLs to string
        For Each lstWebList In ActiveWeb.Lists
            If strURL = "" Then
                strURL = lstWebList.Name & "  -  " & _
                lstWebList.NewForm & vbCr
            Else
                strURL = strURL & lstWebList.Name & "  -  " & _
                lstWebList.NewForm & vbCr
            End If
        Next
        'Display URLs of all New forms in web
        MsgBox "The relative URLs of the New forms are:" _
               & vbCr & vbCr & strURL
    Else
        'Otherwise display message to user
        MsgBox "The current web contains no lists."
    End If

End Sub