Tag Archives: How to fix a compile error for officewriter

Designer Compile Error: Object library invalid or contains references that cannot be found

Problem

When the OfficeWriter Designer is installed, Excel or Word throws a VBA compilation error:

Object library invalid or contains references that cannot be found.

This error can occur if you installed a version of Office on a system in which the Office Designer had already been installed for a different version of Office. For example, you were using OfficeWriter Designer with Office 2007, then later installed any component of Office 2010, including SharePoint Designer 2010 (which is a part of the Office Suite). The error does not go away even if you uninstall one Office version.

This problem will not occur if you install OfficeWriter Designer for the first time on a system which is already running two versions of Office side-by-side.

The error is thrown at startup when Excel or Word attempts to load the add-in template which contains the VBA code for the OfficeWriter Designer. Excel or Word is attempting to use a cached, incompatible version of certain Microsoft control type libraries.

Solution

Resolve the error by removing all cached control type libraries as follows:

  1. Close all running instances of Excel or Word
  2. Navigate to \users\USERNAME\appdata\roaming\microsoft\forms
  3. Remove all *.exd files
  4. Start Excel or Word. Upon starting, the compatible version of the required .exd files will be automatically restored.

Update 4/10/2012: This issue might also occur if you installed the Microsoft April 2012 security update on a machine that had the OfficeWriter Designer installed. For more details about the April 2012 security update specifically, please refer to Microsoft’s kb article.

Update 8/12/2012: Similar issues may be the result of the August 2012 security update. If following the steps listed above do not resolve the issue, please try following the steps listed in this OfficeWriter kb article.