Share via


AddIns.Add Method

Adds a new add-in file to the list of add-ins. Returns an AddIn object.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Add ( _
    Filename As String, _
    CopyFile As Object _
) As AddIn
'Usage
Dim instance As AddIns
Dim Filename As String
Dim CopyFile As Object
Dim returnValue As AddIn

returnValue = instance.Add(Filename, CopyFile)
AddIn Add(
    string Filename,
    Object CopyFile
)

Parameters

  • Filename
    Type: System.String

    Required String. The name of the file that contains the add-in you want to add to the list in the add-in manager.

  • CopyFile
    Type: System.Object

    Optional Object. Ignored if the add-in file is on a hard disk. True to copy the add-in to your hard disk if the add-in is on a removable medium (a floppy disk or compact disc). False to have the add-in remain on the removable medium. If this argument is omitted, Microsoft Excel displays a dialog box and asks you to choose.

Return Value

Type: Microsoft.Office.Interop.Excel.AddIn

Remarks

This method doesn't install the new add-in. You must set the Installed property to install the add-in.

See Also

Reference

AddIns Interface

AddIns Members

Microsoft.Office.Interop.Excel Namespace