Visual Basic Reference

Visual Studio 6.0

Add Method (ExportFormats Collection)

See Also    Example    Applies To

Adds an ExportFormat object to the ExportFormats collection and returns a reference to the newly created object.


object.Add (Key, FormatType, FileFormatString, FileFilter, Template)

The Add method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
Key Required. A unique string that identifies the member of the collection.
FormatType Required. Sets the report type of the object, as shown in Settings.
FileFormatString Required. Sets the text displayed in the Save As combo box of the Export dialog box.
FileFilter Required. Sets the file extension to be used if the user selects the ExportFormat object in Export dialog box. If multiple file filters are used, the first becomes the default extension.
Template Optional. Sets the template to be used for the report.


The settings for FormatType are:

Constant Value Description
rptFmtText 1 Text
rptFmtUnicodeText 2 Unicode
rptFmtUnicodeHTML_UTF8 3 HTML encoded using Universal Character Set (UTF 8)

Return Type

ExportFormat object


If you do not specify a Template, Visual Basic supplies a default template appropriate to the FormatType.