NB: Search and shopping questions are off-topic, as are tech support and custom programming questions. General process and basic configuration questions are often on topic, but the question as originally phrased didn't meet those criteria. It has since been edited to be on topic, but if you're looking for a programming solution then it's no longer about the practice or profession of project management.
You've received some reasonable answers already. Since you didn't explain why you need to do this, I'm going to try to address the X in what appears to be an X/Y question.
- Determine whether this is really critical path.
- If you need to do it, and none of the other answers here suit you, then it's a technical support question for Microsoft.
- If it turns into a custom programming question, then this is a feature request for your in-house tool support or custom programming resources.
- If you need #2 or #3 then you need to include those resources or costs in your project, and get them onto the project plan if it's going to consume project resources.
- If it's not critical path or you don't want to treat it as a support or development issue, then consider an alternative approach to reach your goal that isn't so tool-driven.