Visual Basic Reference
See Also Example Applies To
Adds a filename to the Files collection of a DataObject object.
object.Add (filename, index)
The Add method syntax has these parts:
|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.|
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.