<customizations> 項目 (Visual Studio 中的 Office 程式開發)
vstov4 命名空間的 customizations 項目包含有關安裝和載入每個 Office 方案的所有資訊。
文件層級自訂的語法
<customizations>
<customization
id
<document
solutionId
/>
</customization>
</customizations>
應用程式層級增益集的語法
<customizations>
<customization
id
<appAddin
application
loadBehavior
keyName>
<friendlyName></friendlyName>
<description></description>
<formRegions></formRegions>
</customization>
</customizations>
項目和屬性
customizations 項目包含每個 Office 方案自訂的特定資訊。 這個項目必須在下列命名空間中:vstov4=urn:schemas-microsoft-com:vsto.v4。 組件的子項目也必須位在這個命名空間中。
customizations 項目沒有任何屬性。
customizations 項目具有下列子項目。
customization
必要項。 在 <customization> 項目 (Visual Studio 中的 Office 程式開發)中會定義 vstov4 命名空間中的 customization 項目。
文件層級自訂範例
描述
下列程式碼範例會示範文件層級自訂的 customizations 項目。
![]() |
---|
這個程式碼範例是 Office 方案的應用程式資訊清單中完整範例的一部分。 |
程式碼
<vstov4:customizations
xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4">
<vstov4:customization>
<vstov4:document
solutionId="73e" />
</vstov4:customization>
</vstov4:customizations>
應用程式層級增益集範例
說明
下列程式碼範例會示範應用程式層級增益集的 customizations 項目。 這是包含表單區域的 Outlook 增益集。 這個程式碼範例是 Office 方案的應用程式資訊清單中完整範例的一部分。
程式碼
<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>