How to find the distance between object boundaries using VBA?

Good day!

Tell me, please, how this can be implemented. At least part of the whole issue.

I need to dot the points evenly inside the object. Evenly in width and height.

Earlier in the macro, I just selected the shape, calculated the length and width, and evenly set the number of points I needed.

However, the selected area does not always correspond to the actual boundaries. If, for example, I would now use the same macro to arrange the points in the letter "e", then some of the points would be in the "empty" space.

Therefore, I need to change the algorithm.
 
Because I always place all the points relative to the horizon, then I calculate the height and find what distance I need between the points vertically.

How to deal with horizontal distance? I decided that in each new row it was necessary to find the distance directly between the borders of the letter itself, the figure, and based on the result, put points.

And finally the question itself!
or even a few questions ...

1. How can I clearly define the coordinates of the letter, curve, and not the selection itself?
2. How can I find the coordinates of the holes in a letter? If they are not searched and excluded, the dots will be put in an empty space.