Getting exception 'EFilerError: A class named TWordDocument already exists. Do you want to attempt to load this package the next time a project is loaded?' when starting up Delphi

Abstract: Getting exception 'EFilerError: A class named TWordDocument already exists. Do you want to attempt to load this package the next time a project is loaded?' when starting up Delphi

Information in this Brief applies to:

  • Delphi 6, 7
  • Windows

Overview

Explains how to resolve the EFileError loading up the Office Packages.

Details

Everytime I start Delphi 7 I get the following Error dialog box:

Registration procedure Registerxp.Register in package c:&#092program files&#092borland&#092delphi7&#092Bin&#092dclofficexp70.bpl raised exception class EFilerError: A class named TWordDocument already exists. Do you want to attempt to load this package the next time a project is loaded?

I select yes and the dialog repeats and I select yes again and then Delphi 7 IDE loads.

This problem will occur if you have both the Office 2000 and Office XP Automation Server Wrapper Components installed. You must remove one of these installed packages to resolve this issue.

To remove the package, select Components | Install Packages and then scroll down until you see Microsoft Office 2000 Sample Automation Server Wrapper Component and Microsoft Office XP Sample Automation Server Wrapper Component.

Select the one you do not need and click Remove. Once you remove the package, you can shut down and restart Delphi and the error message will go away. The Office package files are:

dclofficexp70.bpl for Office XP and
dcloffice2k70.bpl for Office 2000.