Adds a filename to the Files collection of a DataObject object.
Syntax
object.Add (filename, index)
The Add method syntax has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
filename | Required. A string that sets the name of the file. |
index | Optional. An integer specifying the position where you want to insert the member. If no index is specified, the member is added to the end of the collection. |
Remarks
The Files collection is filled with filenames only when the DataObject object contains data of type vbCFFiles. (The DataObject object can contain several different types of data.) You can iterate through the collection to retrieve the list of file names.