<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MTEXT FORMAT CODES!?!?! in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356714#M71151</link>
    <description>Are you saying you want to remove all formatting codes&lt;BR /&gt;
from the TextString ?  (hmmm, kinda makes you wonder if&lt;BR /&gt;
they should even be there to begin with) ?&lt;BR /&gt;
&lt;BR /&gt;
"Andrew Allen" &lt;ARA1101&gt; wrote in message&lt;BR /&gt;
news:4D179E5DBB2899DCF0DDE68611F16339@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I need to parse the .TextString from an MText object.&lt;BR /&gt;
&amp;gt; However, im having a time trying to find a list of the&lt;BR /&gt;
formatting&lt;BR /&gt;
&amp;gt; codes for mtext.. The link in my help file is not working..&lt;BR /&gt;
&amp;gt; Can anyone help me please??&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; -Andrew&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/ARA1101&gt;</description>
    <pubDate>Wed, 28 Aug 2002 10:46:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-08-28T10:46:27Z</dc:date>
    <item>
      <title>MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356713#M71150</link>
      <description>I need to parse the .TextString from an MText object.&lt;BR /&gt;
However, im having a time trying to find a list of the formatting&lt;BR /&gt;
codes for mtext.. The link in my help file is not working..&lt;BR /&gt;
Can anyone help me please??&lt;BR /&gt;
&lt;BR /&gt;
-Andrew</description>
      <pubDate>Wed, 28 Aug 2002 10:17:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356713#M71150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-28T10:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356714#M71151</link>
      <description>Are you saying you want to remove all formatting codes&lt;BR /&gt;
from the TextString ?  (hmmm, kinda makes you wonder if&lt;BR /&gt;
they should even be there to begin with) ?&lt;BR /&gt;
&lt;BR /&gt;
"Andrew Allen" &lt;ARA1101&gt; wrote in message&lt;BR /&gt;
news:4D179E5DBB2899DCF0DDE68611F16339@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I need to parse the .TextString from an MText object.&lt;BR /&gt;
&amp;gt; However, im having a time trying to find a list of the&lt;BR /&gt;
formatting&lt;BR /&gt;
&amp;gt; codes for mtext.. The link in my help file is not working..&lt;BR /&gt;
&amp;gt; Can anyone help me please??&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; -Andrew&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/ARA1101&gt;</description>
      <pubDate>Wed, 28 Aug 2002 10:46:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356714#M71151</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-28T10:46:27Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356715#M71152</link>
      <description>GOOD POINT!! Lets complain to AutoDesk.  MTEXT is a big fat mess!!&lt;BR /&gt;
HELP ME!!!</description>
      <pubDate>Wed, 28 Aug 2002 11:02:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356715#M71152</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-28T11:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356716#M71153</link>
      <description>Andrew Allen wrote:&lt;BR /&gt;
&amp;nbsp;&lt;BR /&gt;
&amp;gt; I need to parse the .TextString from an MText object.&lt;BR /&gt;
&amp;gt; However, im having a time trying to find a list of the formatting&lt;BR /&gt;
&amp;gt; codes for mtext.. The link in my help file is not working..&lt;BR /&gt;
&lt;BR /&gt;
It worked well in the R14 help file ...&lt;BR /&gt;
&lt;BR /&gt;
\0...\o      Turns overline on and off&lt;BR /&gt;
\L...\l      Turns underline on and off&lt;BR /&gt;
\~           Inserts a nonbreaking space&lt;BR /&gt;
\\           Inserts a backslash&lt;BR /&gt;
\{...\}      Inserts an opening and closing brace&lt;BR /&gt;
\Cvalue;     Changes to the specified color&lt;BR /&gt;
\File name;  Changes to the specified font file&lt;BR /&gt;
\Hvalue;     Changes to the specified text height&lt;BR /&gt;
\Hvaluex;    Changes to multiple of mtext object's property&lt;BR /&gt;
\S...^...;   Stacks the subsequent text at the \ or ^ symbol&lt;BR /&gt;
\Tvalue;     Adjusts the space between characters&lt;BR /&gt;
\Qangle;     Changes obliquing angle&lt;BR /&gt;
\Wvalue;     Changes width factor to produce wide text&lt;BR /&gt;
\A           Sets the alignment value; valid values: 0, 1, 2 (bottom,&lt;BR /&gt;
center, top)&lt;BR /&gt;
\P           Ends paragraph&lt;BR /&gt;
&lt;BR /&gt;
Good Luck, Terry</description>
      <pubDate>Wed, 28 Aug 2002 11:16:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356716#M71153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-28T11:16:14Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356717#M71154</link>
      <description>Thank you terry, that is helpful..&lt;BR /&gt;
Call me a lazy (edited), but i am hoping someone has already made a function&lt;BR /&gt;
to strip out all the (edited), and produce an actual text string, minus the&lt;BR /&gt;
format flags.&lt;BR /&gt;
Do you, or anyone.. have such a function.  I could write it, splitting on&lt;BR /&gt;
all backslashes,.. but like i said, if its already done somewehre, i would&lt;BR /&gt;
appreciate the snippet.&lt;BR /&gt;
THANK YOU!!&lt;BR /&gt;
-andrew</description>
      <pubDate>Wed, 28 Aug 2002 11:20:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356717#M71154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-28T11:20:33Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356718#M71155</link>
      <description>Well - Autodesk apparently didn't have the wisdom to forsee&lt;BR /&gt;
a need for a 'PlainText' property (text without formatting&lt;BR /&gt;
information, kind of like what you get from the innerText&lt;BR /&gt;
property of an HTML element).&lt;BR /&gt;
&lt;BR /&gt;
I was going to suggest copying to the clipboard, but a quick&lt;BR /&gt;
test reveals that even more absurd, copying MTEXT to the&lt;BR /&gt;
clipboard, does not render it in CF_TEXT or Rich text format.&lt;BR /&gt;
&lt;BR /&gt;
Strangely, it does get rendered in CF_TEXT if you copy it&lt;BR /&gt;
from the MTEXT editor.&lt;BR /&gt;
&lt;BR /&gt;
Can I ask what you need the un-formatted text for?</description>
      <pubDate>Wed, 28 Aug 2002 12:29:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356718#M71155</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-28T12:29:27Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356719#M71156</link>
      <description>Andrew Allen wrote:&lt;BR /&gt;
 &lt;BR /&gt;
&amp;gt; Call me a lazy (edited), but i am hoping someone has already made a function&lt;BR /&gt;
&amp;gt; to strip out all the (edited), and produce an actual text string, minus the&lt;BR /&gt;
&amp;gt; format flags.&lt;BR /&gt;
&lt;BR /&gt;
I saw one once in LSP by Steve Doman, you may search google groups for&lt;BR /&gt;
it.&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Thu, 29 Aug 2002 03:47:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356719#M71156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-29T03:47:39Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356720#M71157</link>
      <description>Tony,&lt;BR /&gt;
I am writing a script to mass process many directories of many old drawings.&lt;BR /&gt;
This script will standardize the lot of them.  In THIS particular case, i&lt;BR /&gt;
want to take whatever text is there, whether it be MText or Regular text and&lt;BR /&gt;
get its contents, then recreate it in regular, standard text format.&lt;BR /&gt;
-Andrew&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO at="" caddzone="" dot="" com=""&gt; wrote in message&lt;BR /&gt;
news:CF7F481CE8811575171F07F714869DED@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Well - Autodesk apparently didn't have the wisdom to forsee&lt;BR /&gt;
&amp;gt; a need for a 'PlainText' property (text without formatting&lt;BR /&gt;
&amp;gt; information, kind of like what you get from the innerText&lt;BR /&gt;
&amp;gt; property of an HTML element).&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I was going to suggest copying to the clipboard, but a quick&lt;BR /&gt;
&amp;gt; test reveals that even more absurd, copying MTEXT to the&lt;BR /&gt;
&amp;gt; clipboard, does not render it in CF_TEXT or Rich text format.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Strangely, it does get rendered in CF_TEXT if you copy it&lt;BR /&gt;
&amp;gt; from the MTEXT editor.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Can I ask what you need the un-formatted text for?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Thu, 29 Aug 2002 04:33:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356720#M71157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-29T04:33:56Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356721#M71158</link>
      <description>Andrew Allen wrote:&lt;BR /&gt;
 &lt;BR /&gt;
&amp;gt; Call me a lazy (edited), but i am hoping someone has already made a function&lt;BR /&gt;
&lt;BR /&gt;
Take a look at the discussion over in .drafting called " Importing text&lt;BR /&gt;
files into Autocad", including Steve's routine.&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Thu, 29 Aug 2002 05:04:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356721#M71158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-29T05:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356722#M71159</link>
      <description>I have built a VB Function that works.  It does the job, however i cant&lt;BR /&gt;
garantee that it will catch EVERY formatting code in an MTExt window.. I&lt;BR /&gt;
would be happy to mail it to anyone interested.&lt;BR /&gt;
&lt;BR /&gt;
Thank you everyone&lt;BR /&gt;
&lt;BR /&gt;
-Andrew&lt;BR /&gt;
&lt;BR /&gt;
"Andrew Allen" &lt;ARA1101&gt; wrote in message&lt;BR /&gt;
news:4D179E5DBB2899DCF0DDE68611F16339@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I need to parse the .TextString from an MText object.&lt;BR /&gt;
&amp;gt; However, im having a (edited) of a time trying to find a list of the&lt;BR /&gt;
formatting&lt;BR /&gt;
&amp;gt; codes for mtext.. The link in my help file is not working..&lt;BR /&gt;
&amp;gt; Can anyone help me please??&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; -Andrew&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/ARA1101&gt;</description>
      <pubDate>Thu, 29 Aug 2002 12:17:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356722#M71159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-29T12:17:27Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356723#M71160</link>
      <description>Can I assume that by this you mean you want to convert&lt;BR /&gt;
all existing MTEXT objects into one or more TEXT objects?&lt;BR /&gt;
&lt;BR /&gt;
If you're processing the drawings using a script, you can&lt;BR /&gt;
use the EXPLODE command to explode existing MTEXT entities&lt;BR /&gt;
into standard text, with the caveat that the resulting text&lt;BR /&gt;
is 'fragmented' by formatting changes, in addition to line&lt;BR /&gt;
breaks.&lt;BR /&gt;
&lt;BR /&gt;
"Andrew Allen" &lt;ARA1101&gt; wrote in message&lt;BR /&gt;
news:7C8575893EAF6087C6CC16D62298CCC7@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Tony,&lt;BR /&gt;
&amp;gt; I am writing a script to mass process many directories of many old&lt;BR /&gt;
drawings.&lt;BR /&gt;
&amp;gt; This script will standardize the lot of them.  In THIS particular case, i&lt;BR /&gt;
&amp;gt; want to take whatever text is there, whether it be MText or Regular text&lt;BR /&gt;
and&lt;BR /&gt;
&amp;gt; get its contents, then recreate it in regular, standard text format.&lt;BR /&gt;
&amp;gt; -Andrew&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Tony Tanzillo" &lt;TONY.TANZILLO at="" caddzone="" dot="" com=""&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:CF7F481CE8811575171F07F714869DED@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; Well - Autodesk apparently didn't have the wisdom to forsee&lt;BR /&gt;
&amp;gt; &amp;gt; a need for a 'PlainText' property (text without formatting&lt;BR /&gt;
&amp;gt; &amp;gt; information, kind of like what you get from the innerText&lt;BR /&gt;
&amp;gt; &amp;gt; property of an HTML element).&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; I was going to suggest copying to the clipboard, but a quick&lt;BR /&gt;
&amp;gt; &amp;gt; test reveals that even more absurd, copying MTEXT to the&lt;BR /&gt;
&amp;gt; &amp;gt; clipboard, does not render it in CF_TEXT or Rich text format.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Strangely, it does get rendered in CF_TEXT if you copy it&lt;BR /&gt;
&amp;gt; &amp;gt; from the MTEXT editor.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Can I ask what you need the un-formatted text for?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/TONY.TANZILLO&gt;&lt;/ARA1101&gt;</description>
      <pubDate>Thu, 29 Aug 2002 13:26:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356723#M71160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-29T13:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356724#M71161</link>
      <description>Andrew,&lt;BR /&gt;
&lt;BR /&gt;
Could I get that mtext code removing VB Function?&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Thu, 18 May 2006 19:21:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356724#M71161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-18T19:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356725#M71162</link>
      <description>Good point, who knows what you've missed. I have all I could find in here&lt;BR /&gt;
[code]&lt;BR /&gt;
Function UnformatMtext(S As String) As String&lt;BR /&gt;
    &lt;BR /&gt;
    Dim P1 As Integer&lt;BR /&gt;
    Dim P2 As Integer, P3 As Integer&lt;BR /&gt;
    Dim intStart As Integer&lt;BR /&gt;
    Dim strCom As String&lt;BR /&gt;
    Dim strReplace As String&lt;BR /&gt;
    &lt;BR /&gt;
    Debug.Print S&lt;BR /&gt;
&lt;BR /&gt;
    Select Case Left(S, 4)&lt;BR /&gt;
        Case "\A0;", "\A1;", "\A2;"&lt;BR /&gt;
            S = Mid(S, P1 + 5)&lt;BR /&gt;
    End Select&lt;BR /&gt;
    intStart = 1&lt;BR /&gt;
    Do&lt;BR /&gt;
        P1 = InStr(S, "%%")&lt;BR /&gt;
        If P1 = 0 Then&lt;BR /&gt;
            Exit Do&lt;BR /&gt;
        Else&lt;BR /&gt;
            Select Case Mid(S, P1 + 2, 1)&lt;BR /&gt;
            Case "P"&lt;BR /&gt;
                S = Replace(S, "%%P", "+or-")&lt;BR /&gt;
            Case "D"&lt;BR /&gt;
                S = Replace(S, "%%D", " deg")&lt;BR /&gt;
            End Select&lt;BR /&gt;
        End If&lt;BR /&gt;
    Loop&lt;BR /&gt;
&lt;BR /&gt;
    Do&lt;BR /&gt;
        P1 = InStr(intStart, S, "\", vbTextCompare)&lt;BR /&gt;
        If P1 = 0 Then Exit Do&lt;BR /&gt;
        strCom = Mid(S, P1, 2)&lt;BR /&gt;
        Select Case strCom&lt;BR /&gt;
            Case "\p"&lt;BR /&gt;
                P2 = InStr(1, S, ";")&lt;BR /&gt;
                S = Mid(S, P2 + 1)&lt;BR /&gt;
            Case "\A", "\C", "\f", "\F", "\H", "\Q", "\T", "\W"&lt;BR /&gt;
                P2 = InStr(P1 + 2, S, ";", vbTextCompare)&lt;BR /&gt;
                P3 = InStr(P1 + 2, S, strCom, vbTextCompare)&lt;BR /&gt;
                If P3 = 0 Then&lt;BR /&gt;
                    S = Left(S, P1 - 1) &amp;amp; Mid(S, P2 + 1)&lt;BR /&gt;
                End If&lt;BR /&gt;
                Do While P3 &amp;gt; 0&lt;BR /&gt;
                    P2 = InStr(P3, S, ";", vbTextCompare)&lt;BR /&gt;
                    S = Left(S, P3 - 1) &amp;amp; Mid(S, P2 + 1)&lt;BR /&gt;
                    'Debug.Print s, strCom&lt;BR /&gt;
                    P3 = InStr(1, S, strCom, vbTextCompare)&lt;BR /&gt;
                Loop&lt;BR /&gt;
                    's = Left(s, P3 - 1) &amp;amp; mid(s, P3 + 1)&lt;BR /&gt;
            Case "\L", "\O"&lt;BR /&gt;
                Dim strLittle As String&lt;BR /&gt;
                strLittle = LCase(strCom)&lt;BR /&gt;
                P2 = InStr(P1 + 2, S, strLittle, vbTextCompare)&lt;BR /&gt;
                S = Left(S, P1 - 1) &amp;amp; Mid(S, P1 + 2, P2 - (P1 + 2)) &amp;amp; Mid(S, P2 + 2)&lt;BR /&gt;
            Case "\S"&lt;BR /&gt;
                P2 = InStr(P1 + 2, S, ";", vbTextCompare)&lt;BR /&gt;
                P3 = InStr(P1 + 2, S, "/", vbTextCompare)&lt;BR /&gt;
                If P3 = 0 Or P3 &amp;gt; P2 Then&lt;BR /&gt;
                    P3 = InStr(P1 + 2, S, "#", vbTextCompare)&lt;BR /&gt;
                End If&lt;BR /&gt;
                If P3 = 0 Or P3 &amp;gt; P2 Then&lt;BR /&gt;
                    P3 = InStr(P1 + 2, S, "^", vbTextCompare)&lt;BR /&gt;
                End If&lt;BR /&gt;
                S = Left(S, P1 - 1) &amp;amp; Mid(S, P1 + 2, P3 - (P1 + 2)) _&lt;BR /&gt;
                        &amp;amp; "/" &amp;amp; Mid(S, P3 + 1, (P2) - (P3 + 1)) &amp;amp; Mid(S, P2 + 1)&lt;BR /&gt;
                        &lt;BR /&gt;
            Case "\U"&lt;BR /&gt;
                strLittle = Mid(S, P1 + 3, 4)&lt;BR /&gt;
                Debug.Print strLittle&lt;BR /&gt;
                Select Case strLittle&lt;BR /&gt;
                    Case "2248"&lt;BR /&gt;
                        strReplace = "ALMOST EQUAL"&lt;BR /&gt;
                    Case "2220"&lt;BR /&gt;
                        strReplace = "ANGLE"&lt;BR /&gt;
                    Case "2104"&lt;BR /&gt;
                        strReplace = "CENTER LINE"&lt;BR /&gt;
                    Case "0394"&lt;BR /&gt;
                        strReplace = "DELTA"&lt;BR /&gt;
                    Case "0278"&lt;BR /&gt;
                        strReplace = "ELECTRIC PHASE"&lt;BR /&gt;
                    Case "E101"&lt;BR /&gt;
                        strReplace = "FLOW LINE"&lt;BR /&gt;
                    Case "2261"&lt;BR /&gt;
                        strReplace = "IDENTITY"&lt;BR /&gt;
                    Case "E200"&lt;BR /&gt;
                        strReplace = "INITIAL LENGTH"&lt;BR /&gt;
                    Case "E102"&lt;BR /&gt;
                        strReplace = "MONUMENT LINE"&lt;BR /&gt;
                    Case "2260"&lt;BR /&gt;
                        strReplace = "NOT EQUAL"&lt;BR /&gt;
                    Case "2126"&lt;BR /&gt;
                        strReplace = "OHM"&lt;BR /&gt;
                    Case "03A9"&lt;BR /&gt;
                        strReplace = "OMEGA"&lt;BR /&gt;
                    Case "214A"&lt;BR /&gt;
                        strReplace = "PROPERTY LINE"&lt;BR /&gt;
                    Case "2082"&lt;BR /&gt;
                        strReplace = "SUBSCRIPT2"&lt;BR /&gt;
                    Case "00B2"&lt;BR /&gt;
                        strReplace = "SQUARED"&lt;BR /&gt;
                    Case "00B3"&lt;BR /&gt;
                        strReplace = "CUBED"&lt;BR /&gt;
&lt;BR /&gt;
                End Select&lt;BR /&gt;
                S = Replace(S, "\U+" &amp;amp; strLittle, strReplace)&lt;BR /&gt;
                &lt;BR /&gt;
            Case "\~"&lt;BR /&gt;
                S = Replace(S, "\~", " ")&lt;BR /&gt;
                &lt;BR /&gt;
            Case "\\"&lt;BR /&gt;
                intStart = P1 + 2&lt;BR /&gt;
                S = Replace(S, "\\", "\")&lt;BR /&gt;
                GoTo Selectagain&lt;BR /&gt;
                &lt;BR /&gt;
            Case "\P"&lt;BR /&gt;
                intStart = P1 + 1&lt;BR /&gt;
                GoTo Selectagain&lt;BR /&gt;
            Case Else&lt;BR /&gt;
                Exit Do&lt;BR /&gt;
        End Select&lt;BR /&gt;
Selectagain:&lt;BR /&gt;
    Loop&lt;BR /&gt;
    &lt;BR /&gt;
   Do&lt;BR /&gt;
        P1 = InStr(1, S, "\P", vbTextCompare)&lt;BR /&gt;
        If P1 = 0 Then&lt;BR /&gt;
            Exit Do&lt;BR /&gt;
        Else&lt;BR /&gt;
            S = Left(S, P1 - 1) &amp;amp; vbCrLf &amp;amp; Mid(S, P1 + 2)&lt;BR /&gt;
        End If&lt;BR /&gt;
    Loop&lt;BR /&gt;
    For intStart = 0 To 1&lt;BR /&gt;
        If intStart = 0 Then&lt;BR /&gt;
            strCom = "}"&lt;BR /&gt;
        Else&lt;BR /&gt;
            strCom = "{"&lt;BR /&gt;
        End If&lt;BR /&gt;
        P2 = InStr(1, S, strCom)&lt;BR /&gt;
        &lt;BR /&gt;
        Do While P2 &amp;gt; 0&lt;BR /&gt;
            S = Left(S, P2 - 1) &amp;amp; Mid(S, P2 + 1)&lt;BR /&gt;
            P2 = InStr(1, S, strCom)&lt;BR /&gt;
        Loop&lt;BR /&gt;
    Next intStart&lt;BR /&gt;
    &lt;BR /&gt;
    &lt;BR /&gt;
 UnformatMtext = S&lt;BR /&gt;
&lt;BR /&gt;
End Function&lt;BR /&gt;
&lt;BR /&gt;
Sub Testmt()&lt;BR /&gt;
    Dim Mt As AcadMText, V As Variant&lt;BR /&gt;
    ThisDrawing.Utility.GetEntity Mt, V, "Pick an Mtext:"&lt;BR /&gt;
    Debug.Print Mt.TextString&lt;BR /&gt;
    Mt.TextString = UnformatMtext(Mt.TextString)&lt;BR /&gt;
    Debug.Print Mt.TextString&lt;BR /&gt;
End Sub&lt;BR /&gt;
[/code]</description>
      <pubDate>Fri, 19 May 2006 01:09:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356725#M71162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-19T01:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356726#M71163</link>
      <description>I would like to take your code and try to apply it to an AutoCAD Table.  In other words remove mtext formatting codes in a Acad table.  But my VBA skills are not that good, so before I tackle that has anybody already created a prog to get rid of formatting codes of a table?&lt;BR /&gt;
&lt;BR /&gt;
Eric</description>
      <pubDate>Thu, 15 Feb 2007 19:21:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356726#M71163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-15T19:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356727#M71164</link>
      <description>I've tried it with regexp - but it's hard;-)&lt;BR /&gt;
Anyway, a test and just for fun, its friday ...&lt;BR /&gt;
&lt;BR /&gt;
my mtext.textstring look's at first:&lt;BR /&gt;
&lt;BR /&gt;
{\fArial|b0|i1|c0|p34;zeile1}\P{\fArial Narrow|b1|i0|c0|p34;\C2;zeile2\P\fBauhaus 93|b0|i0|c0|p82;\H2x;\L\C256;zeile3\P\fArial|b0|i0|c0|p34;\H0.5x;zeile4}&lt;BR /&gt;
&lt;BR /&gt;
and at last:&lt;BR /&gt;
&lt;BR /&gt;
zeile1\Pzeile2\Pzeile3\Pzeile4&lt;BR /&gt;
&lt;BR /&gt;
I don't know, if i've taken all possibilities,&lt;BR /&gt;
it's just a careful step along the stony mText-way.&lt;BR /&gt;
&lt;BR /&gt;
'****************************************************************&lt;BR /&gt;
Sub regexTest()&lt;BR /&gt;
  Dim sset As AcadSelectionSet, ent As AcadEntity, re As Object&lt;BR /&gt;
  Set sset = ActiveDocument.SelectionSets.Add("set2")&lt;BR /&gt;
  sset.SelectOnScreen&lt;BR /&gt;
  Set re = CreateObject("vbscript.regexp")&lt;BR /&gt;
  re.IgnoreCase = 1: re.Global = 1: re.MultiLine = 0&lt;BR /&gt;
&lt;BR /&gt;
  re.Pattern = "\{?(?:\\[fHLC].*?;|\}).*?(.*?)"&lt;BR /&gt;
  &lt;BR /&gt;
  For Each ent In sset&lt;BR /&gt;
      If TypeOf ent Is IAcadMText Then&lt;BR /&gt;
         Debug.Print ent.TextString&lt;BR /&gt;
         ent.TextString = re.Replace(ent.TextString, "$1")&lt;BR /&gt;
         Debug.Print ent.TextString&lt;BR /&gt;
      End If&lt;BR /&gt;
   Next&lt;BR /&gt;
   sset.Delete&lt;BR /&gt;
   Set re = Nothing&lt;BR /&gt;
End Sub&lt;BR /&gt;
'****************************************************************&lt;BR /&gt;
&lt;BR /&gt;
BTW, some hint's are welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
cu trekkie</description>
      <pubDate>Fri, 16 Feb 2007 18:58:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356727#M71164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-16T18:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356728#M71165</link>
      <description>Thanks for sharing this function. It was crashing for me on underlined text that had the starting \L but was underlined till the end and didn't have the ending \l. For example this mtext string:&lt;BR /&gt;
&lt;BR /&gt;
{\fArial|b1|i0|c0|p34;\LGENERAL NOTES :}&lt;BR /&gt;
&lt;BR /&gt;
I fixed it by slightly changing the case for \L as follows:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
            Case "\L", "\O"&lt;BR /&gt;
                Dim strLittle As String&lt;BR /&gt;
                strLittle = LCase(strCom)&lt;BR /&gt;
                P2 = InStr(P1 + 2, S, strLittle, vbTextCompare)&lt;BR /&gt;
                If P2 = 0 Then&lt;BR /&gt;
                    S = Left(S, P1 - 1) &amp;amp; Mid(S, P1 + 2)&lt;BR /&gt;
                Else&lt;BR /&gt;
                    S = Left(S, P1 - 1) &amp;amp; Mid(S, P1 + 2, P2 - (P1 + 2)) &amp;amp; Mid(S, P2 + 2)&lt;BR /&gt;
                End If&lt;BR /&gt;
&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2007 04:04:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356728#M71165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-14T04:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356729#M71166</link>
      <description>Thanks for posting the fix.</description>
      <pubDate>Sun, 17 Jun 2007 16:30:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356729#M71166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-17T16:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356730#M71167</link>
      <description>Thank you all for your contribution. I'm really benefited from this forum.</description>
      <pubDate>Thu, 29 Oct 2009 17:28:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356730#M71167</guid>
      <dc:creator>harryliu3140</dc:creator>
      <dc:date>2009-10-29T17:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356731#M71168</link>
      <description>Hi Out There, &lt;BR /&gt;
&lt;BR /&gt;
I was wondering after reading the tread on MText with interest, if there was any code for changing String Text to MText and then to copy the MText into a table and then export to Excel. &lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
Jeremy</description>
      <pubDate>Sun, 01 Nov 2009 11:02:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/356731#M71168</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-01T11:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: MTEXT FORMAT CODES!?!?!</title>
      <link>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/7033535#M71169</link>
      <description>&lt;P&gt;This can be accomplished with regex. &amp;nbsp;Just implement the code to remove any matches. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;\\[A-Za-z0-9.\/\#\^]+;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 15:36:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/mtext-format-codes/m-p/7033535#M71169</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-21T15:36:15Z</dc:date>
    </item>
  </channel>
</rss>

