I have an Excel project that interacts with Word. The project needs to run in Excel 2007 and Excel 2010. The VBA also needs to reference the Word object library - 12.0 for Excel 2007 and 14.0 for Excel 2010.
The application works fine if it starts in 2007 and is then used in an Excel 2010 environment i.r. Excel successfully switches the reference from 12.0 to 14.0. However the reverse fails i.e. moving from Excel 2010 to Excel 2007 the reference becomes invalid.
I can manage this within code by re-setting the reference but this requires the user to over-ride the Microsoft security setting to allow VBA code to have access to the VBA Project Object Model.
Is there a way to ensure that both Word Object Library versions are available to both an Excel 2007 and an Excel 2010 workbook?