
The Visual Basic window opens, with the line of code that sets the reference to the Word application object highlighted.

If there is no Word reference, and you run mcrTestWordAutomationCode, this error message will pop up:

If you don’t have references to Word or Outlook, you will get errors. Messages with data related to referenced object libraries 13 of any Office application, presumably for superstitious reasons.Įach of the three macros in the test database runs a procedure that pops up a message box displaying relevant information: See the table later in this article for information on version numbers. The version number in the References dialog is not the familiar one, Office 2010, but rather v. The References dialog, with references set to Office applications These references are set in the References dialog opened from the Visual Basic window: In addition to the standard references, the database has references to Outlook, Excel and Word, as well as ADO 2.8 (in Access 2007 and higher, DAO support is provided by the Microsoft Office Access database engine Object Library).

I made a database in Access 2010, containing only a module with four procedures and three macros to run some of the procedures. The situation is exactly the same as then only the version numbers have changed. You might think that over the last 16 years Microsoft would have addressed this annoying problem, but no such luck. Back in 2002 I wrote an Access Archon article dealing with reference issues, among them the problem of certain references being upgraded when a database is opened in a higher version of Access, but not downgraded when it is again opened in a lower version.
