A
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

Visual Basic Extensibility Reference

Visual Studio 6.0

AddFromTemplate Method

See Also   Example   Applies To

  • VBComponents collection: Returns the newly created component, and creates a new component from a template.

  • VBProjects collection: Returns a collection of all projects added as a result of a call to this method, or creates a new project using an existing project as a template.

Syntax

object.AddFromTemplate (filename As String) As VBComponent

object.AddFromTemplate (ByVal pathname As String, [exclusive As Boolean]) As VBNewProjects

The AddFromTemplate 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 expression specifying the path and filename of the file to open as a template.
exclusive Optional. Default = False. A Boolean expression. If set to True, then the existing group project is closed and the new project is created as the only open project.
pathname Required. A string expression specifying the path to the file to use as the template.

Remarks

If the file type referenced is a group project file, and exclusive is set to False, then all projects in that file are created as templates and added to the current set of open projects. If exclusive is set to True, however, the current group project is closed and a new group project created, and all projects within the group project template are created as project templates. The object returned by the method is Nothing.

New project or projects are given the usual default names.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.