Export (0) Print
Expand All
A
Expand Minimize

Visual Basic Extensibility Reference

Visual Studio 6.0

AddFile Method

See Also   Example   Applies To

Returns the newly added component.

Syntax

object.AddFile (ByVal pathname As String, [relateddocument As Boolean]) As VBComponent

The AddFile method syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
pathname Required. A string expression specifying the path and filename of the file to open as a template.
relateddocument Optional (for text files only). Default = False. A Boolean expression specifying whether the file is to be treated as a standard module or a document. If set to True, then the file added is treated as a document file.

Remarks

Files that are normally Visual Basic project components, such as forms, cause an error if the relateddocument parameter is set to True. The relateddocument parameter is required only when adding text files that can be treated as either standard modules or documents.

Show:
© 2014 Microsoft