I am very much a novice with no real programming experience...but I wanted to do something similar: Select a phone number, strip out all characters that were not digits, then apply a standarized format of (xxx)xxx-xxxx. This standardized format is mostly just optics for us...we want all phone numbers in a database to be input the same way.
Here's how I did it, I would love to know how to make it cleaner using Peter's search and replace Variable above.
Variables, to me, are uncharted territory. I figured there was a way to do this while doing my own experimentation...but I didn't even know where to begin. It's a learning curve...and a very cool one at that! phoneformat.kmmacros (6.4 KB)