This topic has not yet been rated - Rate this topic

ItemOperations.AddExistingItem Method

Adds an existing item to the current project.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

ProjectItem AddExistingItem (
	[InAttribute] string FileName
)
ProjectItem AddExistingItem (
	/** @attribute InAttribute() */ String FileName
)
function AddExistingItem (
	FileName : String
) : ProjectItem

Parameters

FileName

Required. The full path and file name of the item to be added.

Return Value

A ProjectItem object.
Sub AddExistingItemExample()
   Dim ItemOp As ItemOperations
   ItemOp = DTE.ItemOperations
   ' Add a log file to the project.
   ItemOp.AddExistingItem("d:\windows\ocgen.log")
End Sub
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Advertisement