DataFileName Property

       

Returns or sets a String that represents the name of the file where Microsoft Publisher saves data from a Web form. Read/write.

expression.DataFileName

expression   Required. An expression that returns a WebCommandButton object.

Example

This example sets Publisher to process Web form data by saving it to a comma-delimited text file on the same Web server as the form is stored.

Sub WebDataFile()
    With ThisDocument.Pages(1).Shapes(1).WebCommandButton
        .DataRetrievalMethod = pbSubmitDataRetrievalSaveOnServer
        .DataFileFormat = pbSubmitDataFormatCSV
        .DataFileName = "WebFormData.txt"
    End With
End Sub