Editor's Note: In September 2014, this tip was updated and the LISP file was replaced with a new version. The tip author describes the updates as follows:
Someone at the AutoDesk Customization Forum asked for the T1MJ command in Text1MtextJust.lsp to be able to do the same with Attribute-Definition objects in addition to Text objects, as AutoCAD’s TXT2MTXT command does, so I worked that in. I also changed the Undo begin/end part of it, to not use (command) functions for that, so it will work in AutoCAD 2015 which no longer allows (command) function in error handlers.
Kent Cooper points out that a conversion of bottom-center-justified AutoCAD text into mtext using the built-in Txt2Mtxt command comes out as top-center-justified mtext, rather than bottom-center, which would be like the original text. The Txt2Mtxt command, though it preserves the horizontal component (left/center/right) of the original text’s justification, consistently imposes the Top vertical component, regardless of the original text’s vertical component (top/middle/bottom). That may make some sense when multiple text entities are being combined into mtext, but not when a single one is merely being converted (for example, so that you can get fractions stacked or change something like the color of a portion of it, etc.).
That inspired the routine here, which will change single text entities into mtext and preserve the original text’s justification (or equivalent, for text justifications that are not used with mtext). See comments at the top of the file.