I need to create 2 buttons on excel, one to add the reference Microsoft Word 16.0 object library, another one to remove the reference. Can you help me with the VBA code please?
Asked
Active
Viewed 32 times
1
-
3https://stackoverflow.com/questions/9879825/how-to-add-a-reference-programmatically-using-vba TLDR: use late binding instead and save the headache. – Warcupine Nov 22 '21 at 15:04
-
1[This](https://stackoverflow.com/a/42228424/14608750) great answer from the same post has a very useful function `DebugPrintExistingRefs` that will help you find the GUID of the Word 16.0 object library. Add the reference manually, run the `DebugPrintExistingRefs` and then look at the Immediate Window for the GUID. – Toddleson Nov 22 '21 at 15:18