Freigeben über


<addin>-Element (Office-Entwicklung in Visual Studio)

Das addin-Element des vstav3 -Namespace enthält spezifische Informationen für mit Visual Studio entwickelte Add-Ins auf Anwendungsebene und Anpassungen auf Dokumentebene für Microsoft Office.

<addIn>
  <entryPointsCollection>
    <entryPoints>
      <entryPoint>
      </entryPoint>
    </entryPoints>
  </entryPointsCollection>
  <update></update>
  <postActions>
    <postAction>
      <postActionData>
      </postActionData>
    <postAction>
  </postActions>
  <application>
    <customization>
    </customization>
  </application
</addIn>

Elemente und Attribute

Das addin-Element des vstav3 -Namespace enthält Informationen zur Office-Projektmappe und zur Microsoft Office-Anwendung. Dieses Element muss sich im folgenden Namespace befinden: vstav3=urn:schemas-microsoft-com:vsta.v3. Untergeordnete Elemente müssen sich ebenfalls im Namespace befinden.

Das addin-Element weist keine Attribute auf.

Das addin-Element verfügt über die folgenden untergeordneten Elemente.

entryPoints

Erforderlich. Das entryPoints-Element wird unter <entryPoints>-Element (Office-Entwicklung in Visual Studio) beschrieben.

update

Erforderlich. Das update-Element wird unter <update>-Element (Office-Entwicklung in Visual Studio) beschrieben.

postActions

Optional. Das postActions-Element wird unter <postActions>-Element (Office-Entwicklung in Visual Studio) beschrieben.

application

Erforderlich. Das application-Element wird unter <application>-Element (Office-Entwicklung in Visual Studio) beschrieben.

Beispiel für die Anpassung auf Dokumentebene

Beschreibung

Im folgenden Codebeispiel wird das addin-Element in einer mit ClickOnce bereitgestellten Office-Projektmappe auf Dokumentebene veranschaulicht. Dieses Codebeispiel ist Teil eines umfangreicheren Beispiels, das Sie im Thema Anwendungsmanifeste für Office-Projektmappen finden.

Code

<vstav3:addIn 
  xmlns:vstav3="urn:schemas-microsoft-com:vsta.v3">
  <vstav3:entryPointsCollection>
    <vstav3:entryPoints>
      <vstav3:entryPoint 
        class="ContosoExcelWorkbook.ThisWorkbook">
        <assemblyIdentity 
          name="ContosoExcelWorkbook" 
          version="1.0.0.0" 
          language="neutral" 
          processorArchitecture="msil" />
      </vstav3:entryPoint>
      <vstav3:entryPoint 
        class="ContosoExcelWorkbook.Sheet1">
        <assemblyIdentity 
          name="ContosoExcelWorkbook" 
          version="1.0.0.0" 
          language="neutral" 
          processorArchitecture="msil" />
      </vstav3:entryPoint>
      <vstav3:entryPoint 
        class="ContosoExcelWorkbook.Sheet2">
        <assemblyIdentity 
          name="ContosoExcelWorkbook" 
          version="1.0.0.0" 
          language="neutral" 
          processorArchitecture="msil" />
      </vstav3:entryPoint>
      <vstav3:entryPoint 
        class="ContosoExcelWorkbook.Sheet3">
        <assemblyIdentity 
          name="ContosoExcelWorkbook" 
          version="1.0.0.0" 
          language="neutral" 
          processorArchitecture="msil" />
      </vstav3:entryPoint>
    </vstav3:entryPoints>
  </vstav3:entryPointsCollection>
  <vstav3:update 
    enabled="true">
    <vstav3:expiration 
      maximumAge="7" 
      unit="days" />
  </vstav3:update>
  <vstav3:application>
    <vstov4:customizations 
      xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4">
      <vstov4:customization>
        <vstov4:document 
          solutionId="73e" />
      </vstov4:customization>
    </vstov4:customizations>
  </vstav3:application>
</vstav3:addIn>

Beispiel für Add-Ins auf Anwendungsebene

Beschreibung

Im folgenden Codebeispiel wird das addin-Element in einer mit ClickOnce bereitgestellten Office-Projektmappe auf Anwendungsebene veranschaulicht. Dieses Codebeispiel ist Teil eines umfangreicheren Beispiels, das Sie im Thema Anwendungsmanifeste für Office-Projektmappen finden.

Code

<vstav3:addIn 
  xmlns:vstav3="urn:schemas-microsoft-com:vsta.v3">
  <vstav3:entryPointsCollection>
    <vstav3:entryPoints>
      <vstav3:entryPoint 
        class="ContosoOutlookAddIn.ThisAddIn">
        <assemblyIdentity 
          name="ContosoOutlookAddIn" 
          version="1.0.0.0" 
          language="neutral" 
          processorArchitecture="msil" />
      </vstav3:entryPoint>
    </vstav3:entryPoints>
  </vstav3:entryPointsCollection>
  <vstav3:update 
    enabled="true">
    <vstav3:expiration 
      maximumAge="7" 
      unit="days" />
  </vstav3:update>
  <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>
</vstav3:addIn>

Siehe auch

Referenz

Anwendungsmanifeste für Office-Projektmappen

Bereitstellungsmanifeste für Office-Projektmappen

ClickOnce-Anwendungsmanifest