支援保持啟用增益集Support for keeping add-ins enabled

Office 2013 和更新版本中的程式會提供增益集恢復功能,這表示應用程式會在執行速度很慢時停用增益集。Programs in Office 2013 and later versions provide add-in resiliency, meaning that apps will disable an add-in if it performs slowly. 不過,您可以重新啟用增益集,並防止其他 Office 程式自動停用增益集。However, you can re-enable add-ins and prevent add-ins from being auto-disabled by other Office programs.

避免停用增益集Preventing add-ins from being disabled

雖然增益集停用功能不會停用大多數增益集,但您不想讓增益集始終如一地停用。While most add-ins will not be disabled by the add-in disabling feature, you don't want your add-in to be disabled consistently.

以下是改進增益集效能的一些建議:Following are some suggestions for improving add-in performance:

  • 因為 managed 增益集必須在 Outlook 啟動期間產生載入 .NET Framework 的負載,所以在受管理的增益集上優先使用原生的 COM 增益集。Prefer native COM add-ins over managed add-ins because managed add-ins must incur the overhead of loading the .NET Framework during Outlook startup.

  • 如果您有長時間執行的工作,例如建立資料庫的高成本連線,請將這些工作推遲到啟動之後發生。If you have long-running tasks such as making an expensive connection to a database, defer those tasks to occur after startup.

  • 如果可能的話,請在本機快取資料,而不是在瀏覽器的FolderSwitchBeforeFolderSwitch事件,或專案的Open事件期間進行昂貴的網路通話。If possible, cache data locally rather than making expensive network calls during the FolderSwitch and BeforeFolderSwitch events of an explorer, or Open events of an item.

  • 請注意,Outlook 物件模型的所有呼叫都會在 Outlook 的主前臺執行緒上執行。Be aware that all calls to the Outlook object model execute on Outlook's main foreground thread. 盡可能避免進行長時間執行的 Outlook 物件模型呼叫。Avoid making long-running Outlook object model calls if possible.

  • 在 Outlook 2013 中,從背景執行緒呼叫 outlook 物件模型時,呼叫 Outlook 物件模型會傳回 E_RPC_WRONG_THREAD。In Outlook 2013, calls to the Outlook object model return E_RPC_WRONG_THREAD when the Outlook object model is called from a background thread.

  • 輪詢是一項昂貴的作業,因此永遠傾向于輪詢的事件導向模型。Polling is an expensive operation, so always prefer an event-driven model over polling.

系統管理員對增益集的控制System administrator control over add-ins

使用者可以控制其電腦上所執行的增益集。The user has control over which add-ins run on their computer. 從 Office 2013 開始,系統管理員可以使用群組原則,為增益集設定增強的控制層級。Beginning with Office 2013, system administrators can configure an enhanced level of control for add-ins by using group policy. 群組原則永遠會覆寫使用者設定,並防止使用者變更由受管理增益集的群組原則清單所設定之增益集的增益集設定。Group policy will always override user settings and users are prevented from changing add-in settings for add-ins that have been configured by the group policy List of Managed Add-ins.

對於 Outlook,登錄機碼和設定會在下表中說明。For Outlook, the registry keys and settings are described in the following tables.

名稱Name 描述Description
機碼Key Office 2013:Office 2013:
HKEY_CURRENT_USER \Software\Policies\Microsoft\Office\15.0\Outlook\Resiliency\AddinListHKEY_CURRENT_USER\Software\Policies\Microsoft\Office\15.0\Outlook\Resiliency\AddinList

Office 2016:Office 2016:
HKEY_CURRENT_USER \Software\Policies\Microsoft\Office\16.0\Outlook\Resiliency\AddinListHKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Outlook\Resiliency\AddinList
描述Description 此原則設定可讓您指定受管理的增益集清單永遠啟用、永不停用(封鎖),或由使用者設定。This policy setting allows you to specify the list of managed add-ins are always enabled, always disabled (blocked), or configurable by the user.

附注:在這裡,「受管理」一詞指的是由「群組原則」處理的增益集,而且不會與使用 managed 程式設計語言所開發的增益集相關。NOTE: Here, the term "managed" refers to add-ins that are handled by the group policy, and does not relate to add-ins being developed in managed programming languages.
StringString 增益集的 ProgIDProgID of the add-in
Values 指定值,如下所示:Specify the value as follows:
0 = 永不停用(已封鎖)0 = always disabled (blocked)
1 = 永不啟用1 = always enabled
2 = 由使用者設定,並在啟用時禁止「封鎖所有未受管理的增益集」原則設定封鎖。2 = configurable by the user and not blocked by the Block all unmanaged add-ins policy setting when enabled.

注意

  • 在安裝增益集的用戶端電腦上使用登錄編輯程式,以便取得增益集的 ProgID: HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Office\Outlook\Addins 或 HKEY_CURRENT_USER \SOFTWARE\Microsoft\Office\Outlook\AddinsUse the Registry Editor on the client computer where the add-in is installed, in order to obtain the ProgID for an add-in: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins or HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Outlook\Addins

  • 如果您停用或未啟用此原則設定,將會刪除受管理的增益集清單。If you disable or do not enable this policy setting, the list of managed add-ins will be deleted. 如果啟用 [封鎖所有未受管理的增益集] 原則設定,則會封鎖所有增益集。If the Block all unmanaged add-ins policy setting is enabled, then all add-ins are blocked.

  • 由這個原則停用的增益集絕不會停用 Outlook 增益集停用功能,因為它會停用增益集的效能、恢復性或可靠性原因。Add-ins that are disabled by this policy will never be disabled by the Outlook add-in disabling feature, which disables add-ins for performance, resiliency, or reliability reasons.

  • 若使用者選擇「永遠啟用此增益集」,登錄會更新,以包含要從自動停用功能中免除之增益集的詳細資訊。If the user chooses "Always enable this add-in", the registry is updated to include details about the add-in that is to be exempted from the automatic disabling feature.


名稱Name 描述Description
機碼Key HKEY_CURRENT_USER \Software\Microsoft\Office\x.0\Outlook\Resiliency\DoNotDisableAddinListHKEY_CURRENT_USER\Software\Microsoft\Office\x.0\Outlook\Resiliency\DoNotDisableAddinList
StringString 增益集的 ProgIDProgID of the add-in
Values 介於1和 A 之間的十六進位值,表示增益集最初停用的原因:Hex value between 1 and A indicating the reason the add-in was originally disabled:
0x00000001 引導負載(LoadBehavior = 3)0x00000001 Boot load (LoadBehavior = 3)
0x00000002 需求負載(LoadBehavior = 9)0x00000002 Demand load (LoadBehavior = 9)
0x00000003 損毀0x00000003 Crash
0x00000004 處理 FolderSwitch 事件0x00000004 Handling FolderSwitch event
0x00000005 處理 BeforeFolderSwitch 事件0x00000005 Handling BeforeFolderSwitch event
0x00000006 專案開啟0x00000006 Item Open
0x00000007 反覆運算計數0x00000007 Iteration Count
0x00000008 關閉0x00000008 Shutdown
0x00000009 損毀,但未停用,因為增益集位於允許清單中0x00000009 Crash, but not disabled because add-in is in the allow list
0x0000000A 損毀,但未停用,因為使用者在停用對話方塊中選取 [否]。0x0000000A Crash, but not disabled because user selected no in disable dialog

附注:0預留位置代表 office 的版本(16.0 = office 2016,15.0 = office 2013)。NOTE: The x.0 placeholder represents the version of Office (16.0 = Office 2016, 15.0 = Office 2013).

注意

如果您重新啟用一次導致效能問題的增益集,則在載入增益集的 Office 程式中,使用者可能會出現效能問題。If you re-enable an add-in that caused a performance problem at one time, users may experience performance problems in the future in the Office program for which the add-in is loaded.

若要封鎖不受此原則設定管理的增益集,您也必須設定 [封鎖所有未受管理的增益集]**** 原則設定。To block add-ins that are not managed by this policy setting, you must also configure the Block all unmanaged add-ins policy setting.

另請參閱See also

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.