AddFromTemplate Method (ProjectItems Collection)

       

Copies the indicated file to the ProjectItems directory and then adds the file as a member of the ProjectItems collection.

Syntax

Sub AddFromTemplate (Filename As String, Name As String) As ProjectItem

This syntax has these parts:

Part Description
Filename Required String. A full pathname specifying the file to copy to the ProjectItems directory and to add to the ProjectItems collection.
Name A required String providing a name for the ProjectItem object in the ProjectItems collection. This will also become the name of the item in the destination directory, keeping the same file extension.