"Unspecified Automation Error" after applying MS12-060 (updated 9/26)

This article applies to Word, Access, Excel and PowerPoint. MS12-060 is a security update that was released Tuesday, August 14, 2012. This update replaced MS12-027. You may now be seeing one of the following errors:

"Unspecified Automation Error" when running or compiling your Microsoft Office VBA code after installing MS12-060;

or

"Errors were detected while saving 'filename.xlsm'. Microsoft Office Excel may be able to save the file by removing or repairing some features. To make the repairs in a new file, click Continue. To cancel saving the file, click Cancel."

 

clicking continue you will see "Document failed to save" or similar error.

 

Update - 9/26/2012. See this blog post for the latest update.

 

Fixit Available

 

There is a fixit available for this problem:

 

Office 2010 w SP1 - https://support.microsoft.com/kb/2597986

 

Office 2007 w SP2 or SP3 - https://support.microsoft.com/kb/2687441

 

Office 2003 w SP3 or Office 2003 Web Components w SP3 - https://support.microsoft.com/kb/2687323

 

Steps to fix the problem manually

Alternatively, the manual fix for this problem is to re-register MSCOMCTL.OCX. To do this, follow these steps:

1. Open an administrative-level command prompt. The command prompt MUST be on the administrative level for this to work. Click START, and type RUN in the run command line. On Windows Vista and Windows 7 you will see CMD.EXE appear in the quick search list. Right click CMD.EXE and left click Run As Administrator. A black command prompt opens. On Windows XP, there is no built-in run-as-admin, but you can use the run as menu option (or runas command line) to execute an admin command from a Limited User Account.

2. If on a 64-bit machine, type the following:

regsvr32.exe /u C:\Windows\SysWOW64\MSCOMCTL.OCX

Hit ENTER

then type

regsvr32.exe C:\Windows\SysWOW64\MSCOMCTL.OCX

If on a 32-bit machine, type the following:

regsvr32.exe /u C:\Windows\System32\MSCOMCTL.OCX

hit ENTER

then type

regsvr32.exe C:\Windows\System32\MSCOMCTL.OCX

Your Office program should work again after doing this.

(Updated) 3. NOTE: The following step is done at your own risk. Microsoft doesn't know about any side effects to deleting this registry key. In cases where the re-registration doesn't work and you still get the error, you will need to open the registry editor (START > RUN > REGEDIT) and find and DELETE the following registry key:

HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0

to

HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0OLD

We've heard reports that renaming the key doesn't work. The key has to be deleted.

Afterward, follow steps 1 and 2 to unregister and re-register MSCOMCTL.OCX

Automating a Solution for Multiple Machines

You can also include the unregistration and re-registration in a batch file that is pushed out to multiple machines. Here is a sample script which should do the job:

reg delete hkcr\typelib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0 /f

if exist %systemroot%\SysWOW64\cscript.exe goto 64
%systemroot%\system32\regsvr32 /u mscomctl.ocx
%systemroot%\system32\regsvr32 mscomctl.ocx
exit

:64
%systemroot%\sysWOW64\regsvr32 /u mscomctl.ocx
%systemroot%\sysWOW64\regsvr32 mscomctl.ocx
exit

If you require a batch file that runs silently, use the following:

reg delete hkcr\typelib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0 /f

if exist %systemroot%\SysWOW64\cscript.exe goto 64
%systemroot%\system32\regsvr32 /u mscomctl.ocx /s
%systemroot%\system32\regsvr32 mscomctl.ocx /s
exit

:64
%systemroot%\sysWOW64\regsvr32 /u mscomctl.ocx /s
%systemroot%\sysWOW64\regsvr32 mscomctl.ocx /s
exit

Alternate Solution

See

https://blogs.technet.com/b/office_sustained_engineering/archive/2012/08/24/ms12-060-not-initiating-with-certain-controls.aspx