Any code to convert highlighted text properties to "fraction"

too many steps to do this. Can it be done with a macro?