Sounds like a useful Macro.
Would you like to share it for others to use?
If so, upload to a new topic in the "Macro Library" sub-forum category.
See How to upload your macro. Instructions for uploading to an existing post are just below the main instruction.
You may also find this Macro useful: MACRO: Upload KM Macro to New or Existing Topic @KM [Pub]