Add Method (ExportFormats Collection)

       

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

Syntax

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.

Settings

The settings for FormatType are:

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

Return Type

ExportFormat object

Remarks

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