AddIns2.Add Method

Adds a new add-in to the list of add-ins.

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 AddIns2
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

    The name of the file that contains the add-in to add to the list in the Add-Ins dialog box.

  • CopyFile
    Type: System.Object

    If the add-in file is on a removable medium, specifies whether to copy the add-in to the local hard disk. Specify true to copy the add-in to your hard disk. Specify false to keep the add-in on the removable medium. If this parameter is omitted, Microsoft Excel displays a dialog box and asks the user to choose whether to copy the add-in file. This parameter is ignored if the add-in file is already on the hard disk.

Return Value

Type: Microsoft.Office.Interop.Excel.AddIn
An AddIn object.

See Also

Reference

AddIns2 Interface

AddIns2 Members

Microsoft.Office.Interop.Excel Namespace