First make sure that the macron is available in the font that you use for digits. If a combining mark is taken from a font other than the font of the base character, the result will usually be poor, except by accident. See a list of fonts containing U+0340 (not exhaustive, but useful).
Secondly, the result still depends on the font and on the rendering software. Word processors haven’t been good at this, though they are getting better. In principle, the rendering software should position the combining mark according to the dimensions of the base character, according to the information that is, or should be, in the font file. In practice, this often fails, resulting in some fixed position. The vertical position tends to be suitable for lowercase letters without ascenders, less suitable (or quite unsuitable) for taller characters, like digits in a typical font.
It seems that e.g. for Arial, the placement information in the font is all wrong, resulting in too low position but also badly misplaced to the right. This looks very much like the in the image you included.
Thus, you may need to experiment with fonts to get a reasonable result. Using most fonts, the rendering is awful or miserable. In my quick test, the following fonts seem to result in acceptable rendering (and they are all free): Charis SIL, DejaVu Sans, Doulos SIL, Gentium Basic, Gentium Book Basic. Update: That was too quick, I tested on a web browser, where I can conveniently get a list of all fonts in my system to try. In Word, even these fonts seem to go wrong.