I had a similar thought, though my process was this:
Copy selection
Open New file/project
Paste
Export
However, this uncovered yet another issue. When the New command is used, the new project is opened in the background, and there’s no way to set focus on it in a macro. This is a bug, in that doing command-N or selecting New from the File menu both cause the new project to be opened in the foreground.
Another user has posted today an idea for the ability to make parameter settings when using Export Audio in a Macro. Among other things this should enable yo to set the Export rang (to Selected Audio).
See this Forum post:
I don’t know if this idea is technically feasible but I have added it to my recent GitHub post:
It was not because they were “bored” - they wanted to be able to tidy up the File menu (something that I approve of).
They went from this messy submenu setup:
To this simplified and cleaner
With no sub-menu required to export audio.
BTW this is similar to many earlier versions of Audacity where there were no separate commands for exporting in various formats (MP3, WAV, and Ogg) - and all those commands did was to pre-populate the export dialog with export format (which could still then be changed by the user in that dialog).
Unfortunately in the process of doing this Muse overlooked that many folk quite liked a shortcut for Export Selected Audio - the issue that is addressed in this Forum thread - and my GitHub post.
I wanted to add my voice to those asking for the Export Selected Audio command to be reinstated. Could I also ask that the automatic Edit Metadata pop-up is brought back, or at least that there’s a way to choose whether or not it pops up automatically?
I love Audacity, but these two changes have made a massive impact on what I do, it gone from a three-click task to a six-click task, plus having to remember to manually edit the metadata on each track I’m exporting!