Back to index

Reference to Other VBA Libraries

Sometimes in Excel you need to manipulate files from other Office applications. I have written many macros that interact with Word and Project. Excel VBA code can do this, using code that looks much like what it would look like in VBA in those other applications. But you have to reference libraries for them.

To add a reference, go to the VBA development window (ALT-F11). Select Tools, References.
Tools, References

Then you will get a list of possible references, each with a checkbox. In this example, libraries for Word and Project are added. The 12.0 and 14.0 indicate the version numbers for those applications. Although Microsoft markets Office versions as 2003, 2007, and so on, the version numbers used within the application are just numbers. Version 14.0 refers to Office 2010. For a given application, scroll down the list to find whatever version is installed on your system.