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
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.OCXHit 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
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.ocxexit
:64 %systemroot%\sysWOW64\regsvr32 /u mscomctl.ocx%systemroot%\sysWOW64\regsvr32 mscomctl.ocxexit
If you require a batch file that runs silently, use the following:
if exist %systemroot%\SysWOW64\cscript.exe goto 64 %systemroot%\system32\regsvr32 /u mscomctl.ocx /s%systemroot%\system32\regsvr32 mscomctl.ocx /sexit
:64 %systemroot%\sysWOW64\regsvr32 /u mscomctl.ocx /s%systemroot%\sysWOW64\regsvr32 mscomctl.ocx /sexit
Alternate Solution
See