I would like to export some macros that I have defined and be able to import them into another clean install of Visual Studio with the same module/naming structure that I have defined.
I have some menu command customizations that execute my macros - so to work in another install of Visual Studio, it needs the same macros available.
I would like to avoid a manual step of having to create the macro manually and copy/paste my macro code.
Is this possible? It doesn't seem like 'macros' is an available option to import/export through menu Tools -> Import and Export Settings.
On the External Data tab, click either Saved Imports or Saved Exports. In the Manage Data Tasks dialog box, on the Saved Imports or Saved Exports tab (depending on your choice in the preceding step), click the specification that you want to run. Click Run.
On the Tools tab, select Visual Basic to open the Visual Basic Editor. In the Visual Basic Project Explorer, right click on the project folder, and choose Insert > Module. In the code window, add a subroutine by entering Sub followed by the name for the macro.
Tools->Macros->Macros IDE... (or Alt+F11)
Export: Expand your macros until you find the module you want to export, right-click it, choose Export ModuleName..., select a file, and Save.
Import: Select "MyMacros" or any other, right-click it, and choose Add->Add Existing Item... Select the file you just created, and Add.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With