Edit

Share via


WebCommandButton.DataFileName property (Publisher)

Returns or sets a String that represents the name of the file in which to save data from a web form. Read/write.

Syntax

expression.DataFileName

expression A variable that represents a WebCommandButton object.

Return value

String

Example

This example sets Microsoft 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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.