AddFromTemplate Method (Solution Object)

      Applies To

Copies a project file to a specified location and adds it to the solution as a project file.

Syntax

Sub AddFromTemplate(FileName As String, Destination As String, Name As String, [Exclusive As Boolean = False]) As Project

This syntax has these parts:

Part Description
FileName Required String. A full pathname specifying the template project file.
Destination A required String providing the path to the directory for the file specified by filename.
Name A required String providing the display name of the project in the Solution Browser. This is also the name of the project file without the extension. The AddFromTemplate method fails if the new project file name already exists in the destination folder.
Exclusive Optional Boolean. If True, then the environment closes down the current solution and opens a new solution with this project added. If False, then the project is added to the existing solution. The default is False.