You should be able to change the sources of your layers using logic shown on the following page.
How to change the data source of a layer
http://help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/index.html#//0001000000m5000000
I would think if you wanted this to all happen when the map document is loaded that you'd want to implement this within an application extension where you'd need to incorporate logic on how to determine which geodatabase version to connect to.
Creating an application extension
http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//00010000001v000000
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.