How to measure any text with Word, vba code included

If you’re trying to put up a nice document template with Microsoft Word® you’ll probably have to precisely position different elements of your composition. When these elements are text, it may help to know precisely how much space you need to preserve for their layout.

Sometimes, this can even be tricky. My previous post is the starting point of this discussion, as we were wondering how much space would a date expression take on a document.

With a more generic solution, here is a new Word document with a VBA macro that will compute the length of any text in your unit of choice (millimeters, inches or centimeters).
You can use the document straight out of the box by simply opening it and following the on-screen instructions.
You can also access the code by pressing [ALT]+[F11] if you’re curious to see how it’s done.

Download this template from [Text Width Calculator.docm]