Getting a "Variable Not Defined" Error when attempting to compile MS Accesss mdb file
Posted on 2016-11-14
Warning - this may be more complicated than the subject implies.
I used Access 2016 to update an Access 2000 application.
While using Access 2016 I went into the Referernces section and checked the box for Microsoft Outlook 16 Object Library. Next I created a routine that uses
Set oEmail = oApp.CreateItem(olMailItem)
oEmail.BodyFormat = olFormatHTML
This code runs perfectly from Access 2016 and Win 10 Pro without ever converting to code for a later version of Access, however, when I tried to compile the code using Access 2000 I get the subject error message.
As you would expect, when I view the References the word MISSING: appear next to the line for the Microsoft Outlook 16 Object library.
I have tried to check the Outlook 9 Object Library and receive the same error.
I have also tried copy MSOUTL.OLB to the Access 2000 machine and used BROWSE to select the file but nothing seemed to happen and I get the same error message.
My goal is to run the new code on the existing Access 2000 workstations. Any ideas?