Compartilhar via


<application> Element (Office Development in Visual Studio)

The application element of the vstav3 namespace wraps the description of Office solutions. The child elements are different for document-level customizations and application-level add-ins.

Syntax for Document-Level Customizations

<application>
  <customization
    id
    <document
      solutionId
    />
  </customization>
</application>

Syntax for Application-Level Add-Ins

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

Elements and Attributes

The application element of the vstav3 namespace is the node that wraps all the customization-specific information that is contained in the vstov4 namespace.

The application element has no attributes.

The application element has the following element.

customization

The role of the customization element in the vstov3 namespace is defined in <customization> Element (Office Development in Visual Studio).

Document-Level Customization Example

Description

The following code example illustrates an application element in a document-level Office solution deployed using ClickOnce. This code example is part of a larger example provided in Application Manifests for Office Solutions.

Code

  <vstav3:application>
    <vstov4:customizations 
      xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4">
      <vstov4:customization>
        <vstov4:document 
          solutionId="73e" />
      </vstov4:customization>
    </vstov4:customizations>
  </vstav3:application>

Application-Level Add-in Example

Description

The following code example illustrates an application element in an application-level Office solution deployed using ClickOnce. This code example is part of a larger example provided in Application Manifests for Office Solutions.

Code

  <vstav3:application>
    <vstov4:customizations 
      xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4">
      <vstov4:customization>
        <vstov4:appAddIn 
          application="Outlook" 
          loadBehavior="3" 
          keyName="ContosoOutlookAddIn">
          <vstov4:friendlyName>
            ContosoOutlookAddIn
          </vstov4:friendlyName>
          <vstov4:description>
            ContosoOutlookAddIn - Outlook 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>
      </vstov4:customization>
    </vstov4:customizations>
  </vstav3:application>

See Also

Reference

Application Manifests for Office Solutions

Deployment Manifests for Office Solutions

ClickOnce Application Manifest