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

前端 未结 5 615
栀梦
栀梦 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 11:22

    Consolidating previous answers and expounding upon them here.

    Office products store disabled items in the registry under keys named HKEY_CURRENT_USER\Software\Microsoft\Office\\\Resiliency\DisabledItems. For example, Excel 2010's disabled list is under HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Resiliency\DisabledItems.

    Each disabled item is stored as a randomly-named key of type REG_BINARY. The format of the byte array is:

    • bytes 0-3 : ??? (perhaps a 32-bit uint type code, 1 = COM Addin)
    • bytes 4-7 : 32-bit uint length (in bytes) for the first string (path)
    • bytes 8-11 : 32-bit uint length (in bytes) for the second string (description)
    • bytes 12-end : two strings of unicode characters, the byte length for each of which is stored in the uints above

提交回复
热议问题