I need to code for the correct 'Reference' to MS Outlook from Excel
问题 I want to run some code in Excel , that talks to Outlook . On my machine, I can just select the right reference from Tools->References in the VBE. But I want my code to run for other users on their machines too and they will all have different versions of Outlook and Excel, Is there a tidy way I can make the code select the right reference to MS Outlook, or tell me if Outlook isn't installed, etc? Thanks 回答1: I use a function like this which should work for Outlook 2010. If you're using a