This documentation is archived and is not being maintained.

Workbook.AddinInstall Event

Occurs when the workbook is installed as an add-in.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in

public event WorkbookEvents_AddinInstallEventHandler AddinInstall

The following code example demonstrates a handler for the AddinInstall event. The event handler maximizes Microsoft Office Excel when the workbook is installed as an add-in.

private void WorkbookAddinInstall()
    this.AddinInstall +=
        new Excel.WorkbookEvents_AddinInstallEventHandler(

void ThisWorkbook_AddinInstall()
    this.Application.WindowState = Excel.XlWindowState.xlMaximized;