Partager via


"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

Comments

  • Anonymous
    January 01, 2003
    Thanks for the heads up on the 32-bit path. It's been changed to reflect the right information.

  • Anonymous
    January 01, 2003
    Well, the fact that a fix actually exists saved me, given that legacy apps company wide just suddenly stopped working.

  • Anonymous
    August 16, 2012
    For 32bit machines that should probably read If on a 32-bit machine, type the following: regsvr32.exe /u C:Windowssystem32MSCOMCTL.OCX hit ENTER then type regsvr32.exe C:Windowssystem32MSCOMCTL.OCX

  • Anonymous
    August 16, 2012
    Thankyou for the fix. However, I do feel that the combination of MS12-027 the fixit and now MS12-060 has been a disaster.  It makes deploying this to large scale environments almost impossible as essentially you have to make users  accept that you will be breaking their environment.  The quantity of broken apps I have come across due to the EXD issue with MS12-027 is massive. And now with MS12-060 already generating issues, it's beyond me how this can be deployed to multiple users in a large company.  Let's not forget that we cannot uninstall it either. Disaster.

  • Anonymous
    August 16, 2012
    The instructions above are incorrect for my 32-bit machine as MSCOMCTL.OCX is located in C:WindowsSystem32 not C:Windows

  • Anonymous
    August 16, 2012
    Unfortunately we worked on all day on identifying which patch was breaking our pilot group.  We finally narrowed it down to MS12-060 this morning just to discover this acticle after the fact. Appreciate the article and the fix, but it would have been better to communicate it to through additional means, such as the bulletin notifications which we are signed up for.

  • Anonymous
    August 16, 2012
    I agree with Paul's comments. It feels like a rushed fix which has caused more issues than its fixed. Added to the issues the previous 'fix' caused it all seems very badly managed.

  • Anonymous
    August 16, 2012
    What a geniue.  It solved the problem.  Thanks a lot

  • Anonymous
    August 17, 2012
    Does anyone at Microsoft test their code?  This is a pretty major bug.

  • Anonymous
    August 17, 2012
    Can this be re-registered without incident on a production 2003 R2 terminal server with active users and multiple running Office process instances?

  • Anonymous
    August 19, 2012
    Thank you very much for the info, Will. The solution works like a charm, but needed to restart Outlook after re-registering MSCOMCTL.OCX

  • Anonymous
    August 20, 2012
    Does this problem affect also the old VB6 applications that make use of the mscomctl.ocx control? Thank you.

  • Anonymous
    August 23, 2012
    Anything new about this? Still having problems...

  • Anonymous
    August 27, 2012
    Will there be an official contemporary Hotfix for that? None of the fixes around the net are working for our Citrix Environment...

  • Anonymous
    August 29, 2012
    My VBA's on autocad still doesnt work, yet the error changed to: Compile-error-in-hidden-module

  • Anonymous
    August 29, 2012
    This did not work for me, I also had to pull an old trick out of the bag.  If you continue to experience this pop-up, try going to your %APPDATA%MicrosoftForms folder and delete all of the .exd files.  Once you start Excel back up with a workbook, Excel will generate those files again, and they should be the correct version.  I had to do this for an earlier MS update too.  Hope that helps! Default Folders: XP: C:Documents and Settings%USERNAME%Application DataMicrosoftForms Vista/7: C:Users%USERNAME%AppDataRoamingMicrosoftForms

  • Anonymous
    August 30, 2012
    Any chance of a revised version of this update? I like the machines to be compliant from a security point of view. But obviously don't want to affect 100s of users by pushing out the existing update.

  • Anonymous
    September 04, 2012
    Point is you got to unregister the mscomctl.ocx and then register it again, where it is located, how exactly you type the command etc is probably not very relevant. In my case unregistering and then registering the mscomctl.ocx helped, thanks

  • Anonymous
    September 24, 2012
    The solution was very useful and resolved my issue. Thank You.

  • Anonymous
    September 25, 2012
    Like Mike, I also had to delete the exd files before the problem went away.  At first I got thrown for a loop because I had opened an admin command prompt and didn't see the files before I realized (duh) that %APPDATA% for the admin account on my machine is not the same as %APPDATA% for the currently logged in user. (For non-tech people reading this, %APPDATA% is an alias for a per-user directory for application data, so every user -even on the same system- has a different folder) Note to others:  admin command prompt for registering the OCX, non-admin command prompt to find and delete the exd files.

  • Anonymous
    November 30, 2012
    Please release an update to fix this problem.  This problem is costing us new and existing customers- it is a major problem.  We use Excel as the platform for our product.  Most of our customers to not have administrative rights to their computer and cannot run the fix-it program.  We just had another account cancel our service as a result of this problem.  Please fix your product- release an update ASAP!!!!!!! Real Estate Flyer Builder admin@RealEstateFlyerBuilder.com

  • Anonymous
    December 13, 2012
    yes, this step worked for us. We did unregister the file in the command prompt using admin right. Then we register the same file (MSCOMCTL.OCX). and then it works fine now. thanks for this handy tools. Steps: log in as administrator At command prompt Type:regsvr32.exe /u C:WindowsSystem32MSCOMCTL.OCX hit ENTER then type regsvr32.exe C:WindowsSystem32MSCOMCTL.OCX that it.

  • Anonymous
    December 17, 2012
    The manual correction worked beautifully!  Thank you!

  • Anonymous
    January 10, 2013
    This has happened again from an update on my machine this morning.  Is the fix the same or a different one?

  • Anonymous
    January 28, 2013
    Thanks a lot. These steps resolved my problem.

  • Anonymous
    May 01, 2013
    Thanks this just helped solve a very annoying issue

  • Anonymous
    October 30, 2013
    como hago para registrarme y mandar la hoja de vida

  • Anonymous
    May 13, 2014
    Pingback from Skabeloner og l??sninger til Microsoft Office : SkabelonDesign A/S

  • Anonymous
    May 24, 2014
    The comment has been removed