DocumentFile Property

Example   Applies To   See Also

Returns the name of the file from which a linked OLE object was created. At design time, specifies the name of the linked file. Read-only at design time and run time for an existing object, but can be set for an object when creating it.

Syntax

Object.DocumentFile[ = cFileName]

Settings

cFileName

The name of the file to which the object is linked. The name includes the full path of the file.

Remarks

DocumentFile contains the empty string for embedded (not linked) objects.

You set the DocumentFile property of a linked OLE object using the Insert Object dialog box when you initially add an OLE container to a form. You can also set this property when creating an OLE object using the APPEND GENERAL command or when defining the object in code as part of a class definition.

Before specifying the contents of an OLE object using the DocumentFile property, specify the Automation server application by setting the object's OLEClass.