Measure distance between objects

Hi,

How to achieve this with macro, measure the distance between objects.

we can add it manually, but sometimes there are many letters and it is taking time, hehe. Maybe someone knows how to do it with macro.

Thanks