WebCommandButton.DataFileFormat property (Publisher)

Sets or returns a PbSubmitDataFormatType constant that represents the format to use when saving web form data to a file. Read/write.



expression A variable that represents a WebCommandButton object.

Return value



The DataFileFormat property value can be one of the PbSubmitDataFormatType constants declared in the Microsoft Publisher type library.


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. Note that FileName must be replaced with a valid file name for this example to work.

Sub WebDataFile() 
 With ThisDocument.Pages(1).Shapes(1).WebCommandButton 
 .DataRetrievalMethod = pbSubmitDataRetrievalSaveOnServer 
 .DataFileFormat = pbSubmitDataFormatCSV 
 .DataFileName = "FileName" 
 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.