<appAddin> element (Office development in Visual Studio)

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The appAddin element of the vstov4 namespace stores customization-specific information for VSTO Add-ins.

Syntax

<appAddin
  application
  loadBehavior
  keyName>
  <friendlyName>
  <description>
  <formRegions></formRegions>
</appAddin>

Elements and attributes

The appAddin element is required and is in the vstov4 namespace. There is only one appAddin element defined in an application manifest.

The appAddin element has the following attributes.

Attribute Description
application Required. Identifies the Microsoft Office application. The value can be one of the following: Excel, InfoPath, Outlook, PowerPoint, Project, Visio, or Word.
loadBehavior Optional. By default, the loadBehavior is enabled by setting this value to . For debugging, the VSTO Add-in can be disabled by setting the value to two. For more information, see the table titled LoadBehavior Values in Registry entries for VSTO Add-ins.
keyName Required. This value is the registry key name that will be used by the application to load the VSTO Add-in. For more information, see Registry entries for VSTO Add-ins.

The appAddin element has the following child elements.

friendlyName

Optional. The friendlyName element is explained in <friendlyName> element (Office development in Visual Studio).

description

Optional. The description element is explained in <description> element (Office development in Visual Studio).

formRegions

Required only for Outlook VSTO Add-ins that include form regions. The formRegions element is explained in <formRegions> element (Office development in Visual Studio).

VSTO Add-in example

Description

The following code example illustrates appAddin elements in an Outlook solution deployed using ClickOnce. This code example is part of a larger example provided in Application manifests for Office solutions.

Code

<vstov4:appAddIn
  application="Outlook"
  loadBehavior="3"
  keyName="ContosoOutlookAddIn">
  <vstov4:friendlyName>
    ContosoOutlookAddIn
  </vstov4:friendlyName>
  <vstov4:description>
    ContosoOutlookAddIn - Outlook VSTO Add-in
    created with Visual Studio Tools for Office
  </vstov4:description>
  <vstov4:formRegions>
    <vstov4:formRegion
        name="OutlookAddIn1.FormRegion1">
      <vstov4:messageClass name="IPM.Note" />
      <vstov4:messageClass name="IPM.Contact" />
      <vstov4:messageClass name="IPM.Appointment" />
    </vstov4:formRegion>
  </vstov4:formRegions>
</vstov4:appAddIn>

See also