How to programatically re-enable documents in the MS Office list of disabled files

前端 未结 5 610
栀梦
栀梦 2020-12-18 10:18

MS Office programs keep a list of disabled files that have caused errors when previously opened. A user can remove documents from this list by accessing the list through the

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-18 10:56

    BAT script to re-enable all "disabled items" in Excel 2016.
    Disabled items are found in Excel->File->Options->Addins->Manage->Disabled items.

    :: Deletes all values under the key.  
    REG DELETE HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Excel\Resiliency\DisabledItems /va /f 
    

    Fyi on params:
    /va Delete all values under this key.
    /f Forces the deletion without prompt.

    PS. I have a bunch of workbooks that run macros with a task scheduler. Excel would randomly add workbooks that crashed onto the disabled items list. So running this BAT script daily resolves it OK.

提交回复
热议问题