<?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: Help with setting style &amp;amp; font with VBA in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303469#M65104</link>
    <description>&amp;gt; The co. I work for basically uses these 2 fonts in their drawings ...&lt;BR /&gt;
&lt;BR /&gt;
Don,&lt;BR /&gt;
&lt;BR /&gt;
It would be good to know what manual method is used to switch between the&lt;BR /&gt;
fonts.  If I use the "style" command in ACAD to change the font name from&lt;BR /&gt;
romand to romans.shx, all the text objects that have "Standard" style change&lt;BR /&gt;
font.  So does your company have separate styles defined for the two fonts?&lt;BR /&gt;
Or is all text "Standard"?&lt;BR /&gt;
&lt;BR /&gt;
After playing around some more with text, it seems to me like the best way&lt;BR /&gt;
to get 2 different fonts to "stick" is to have 2 styles called romanD and&lt;BR /&gt;
romanS, and have your macros set one or the other style as active...</description>
    <pubDate>Sat, 15 Mar 2003 12:41:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-03-15T12:41:47Z</dc:date>
    <item>
      <title>Help with setting style &amp; font with VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303464#M65099</link>
      <description>I've attached this code to be run from 2 different buttons, one for the&lt;BR /&gt;
RomanD and the other for the RomanS. The co. I work for basically uses these&lt;BR /&gt;
2 fonts in their drawings and I was trying to automate the switching back&lt;BR /&gt;
and forth. The code works some of the time but not all the time and I can't&lt;BR /&gt;
figure out what's wrong. Can anyone help?&lt;BR /&gt;
&lt;BR /&gt;
The following code is in a module and the buttons work OK&lt;BR /&gt;
&lt;BR /&gt;
'===============================&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
Public SDimScale As Single&lt;BR /&gt;
&lt;BR /&gt;
'-------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
' ROMAN-D code&lt;BR /&gt;
&lt;BR /&gt;
Public Sub SetFontRomanD()&lt;BR /&gt;
Dim objTextStyle As AcadTextStyle&lt;BR /&gt;
    Set objTextStyle = ThisDrawing.TextStyles("standard")&lt;BR /&gt;
   objTextStyle.fontFile = "romand.shx"&lt;BR /&gt;
   SDimScale = ThisDrawing.GetVariable("dimscale")&lt;BR /&gt;
   objTextStyle.Height = SDimScale * 0.1875               'set the font to a&lt;BR /&gt;
height of 3/16"&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
' ROMAN-S code&lt;BR /&gt;
&lt;BR /&gt;
Public Sub SetFontRomanS()&lt;BR /&gt;
Dim objTextStyle As AcadTextStyle&lt;BR /&gt;
    Set objTextStyle = ThisDrawing.TextStyles("standard")&lt;BR /&gt;
    objTextStyle.fontFile = "romans.shx"&lt;BR /&gt;
    SDimScale = ThisDrawing.GetVariable("dimscale")&lt;BR /&gt;
   objTextStyle.Height = SDimScale * 0.09375             'set the font to a&lt;BR /&gt;
height of 3/32"&lt;BR /&gt;
End Sub&lt;BR /&gt;
'===============================&lt;BR /&gt;
&lt;BR /&gt;
TIA&lt;BR /&gt;
DonB</description>
      <pubDate>Thu, 13 Mar 2003 16:57:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303464#M65099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-13T16:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with setting style &amp; font with VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303465#M65100</link>
      <description>It seemed to work for me.  New text objects came in at the 2 different sizes&lt;BR /&gt;
and styles.  Existing text with "Standard" style changed appearance but not&lt;BR /&gt;
size.&lt;BR /&gt;
I added "ThisDrawing.Regen acAllViewports"  as the last line in the subs so&lt;BR /&gt;
I could see changes right away.&lt;BR /&gt;
&lt;BR /&gt;
When it's not working, what specifically does it do or not do?&lt;BR /&gt;
&lt;BR /&gt;
James</description>
      <pubDate>Thu, 13 Mar 2003 17:39:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303465#M65100</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-13T17:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with setting style &amp; font with VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303466#M65101</link>
      <description>OK let me try to explain. Normally the text in the drawing is RomanS at&lt;BR /&gt;
3/32" height but when we label a VIEW as an example the text is supposed to&lt;BR /&gt;
be RomanD at 3/16" height. I would then switch back to RomanS at 3/32. The&lt;BR /&gt;
text at RomanD doesn't seem to "STICK". I'll come back to the drawing later&lt;BR /&gt;
and the RomanD text is 3/16" high but is then RomanS.&lt;BR /&gt;
&lt;BR /&gt;
 I would like the text to stay at 3/16" RomanD and the small text to stay at&lt;BR /&gt;
3/32" RomanS&lt;BR /&gt;
&lt;BR /&gt;
TIA&lt;BR /&gt;
&lt;BR /&gt;
Don&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"DonB" &lt;DONB&gt; wrote in message&lt;BR /&gt;
news:48407A5698F9FA80228A4C65460FF230@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I've attached this code to be run from 2 different buttons, one for the&lt;BR /&gt;
&amp;gt; RomanD and the other for the RomanS. The co. I work for basically uses&lt;BR /&gt;
these&lt;BR /&gt;
&amp;gt; 2 fonts in their drawings and I was trying to automate the switching back&lt;BR /&gt;
&amp;gt; and forth. The code works some of the time but not all the time and I&lt;BR /&gt;
can't&lt;BR /&gt;
&amp;gt; figure out what's wrong. Can anyone help?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; The following code is in a module and the buttons work OK&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; '===============================&lt;BR /&gt;
&amp;gt; Option Explicit&lt;BR /&gt;
&amp;gt; Public SDimScale As Single&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; '-------------------------------------------------------------------&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ' ROMAN-D code&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Public Sub SetFontRomanD()&lt;BR /&gt;
&amp;gt; Dim objTextStyle As AcadTextStyle&lt;BR /&gt;
&amp;gt;     Set objTextStyle = ThisDrawing.TextStyles("standard")&lt;BR /&gt;
&amp;gt;    objTextStyle.fontFile = "romand.shx"&lt;BR /&gt;
&amp;gt;    SDimScale = ThisDrawing.GetVariable("dimscale")&lt;BR /&gt;
&amp;gt;    objTextStyle.Height = SDimScale * 0.1875               'set the font to&lt;BR /&gt;
a&lt;BR /&gt;
&amp;gt; height of 3/16"&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ' ROMAN-S code&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Public Sub SetFontRomanS()&lt;BR /&gt;
&amp;gt; Dim objTextStyle As AcadTextStyle&lt;BR /&gt;
&amp;gt;     Set objTextStyle = ThisDrawing.TextStyles("standard")&lt;BR /&gt;
&amp;gt;     objTextStyle.fontFile = "romans.shx"&lt;BR /&gt;
&amp;gt;     SDimScale = ThisDrawing.GetVariable("dimscale")&lt;BR /&gt;
&amp;gt;    objTextStyle.Height = SDimScale * 0.09375             'set the font to&lt;BR /&gt;
a&lt;BR /&gt;
&amp;gt; height of 3/32"&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt; '===============================&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; TIA&lt;BR /&gt;
&amp;gt; DonB&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/DONB&gt;</description>
      <pubDate>Fri, 14 Mar 2003 15:21:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303466#M65101</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-14T15:21:50Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303467#M65102</link>
      <description>I'm not too great with TextStyles, but instead of changing the fontFile of&lt;BR /&gt;
"Standard", do you want two TextStyles ("D" and "S") that always point to&lt;BR /&gt;
the same FontFiles.  Then your macro would activate one or the other text&lt;BR /&gt;
style?&lt;BR /&gt;
&lt;BR /&gt;
Do you want to affect existing text Objects when you change, or just have&lt;BR /&gt;
the new settings apply to text objects you subsequently create?&lt;BR /&gt;
&lt;BR /&gt;
James</description>
      <pubDate>Fri, 14 Mar 2003 15:40:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303467#M65102</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-14T15:40:49Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303468#M65103</link>
      <description>Hi James&lt;BR /&gt;
&lt;BR /&gt;
I only want to have the settings apply to text that I will be entering and&lt;BR /&gt;
not anything that has been entered previously,  when I change back to the&lt;BR /&gt;
default which would be RomanS at 3/32" all the text I then enter should be&lt;BR /&gt;
"S" at 3/32" until I switch back to "D" style again. I do not want to affect&lt;BR /&gt;
any text already entered in the drawing.&lt;BR /&gt;
&lt;BR /&gt;
TIA&lt;BR /&gt;
&lt;BR /&gt;
DonB&lt;BR /&gt;
&lt;BR /&gt;
"James Belshan" &lt;BELSHAN_JL&gt; wrote in message&lt;BR /&gt;
news:132E621BBE9590E0FD2F4F76248685ED@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I'm not too great with TextStyles, but instead of changing the fontFile of&lt;BR /&gt;
&amp;gt; "Standard", do you want two TextStyles ("D" and "S") that always point to&lt;BR /&gt;
&amp;gt; the same FontFiles.  Then your macro would activate one or the other text&lt;BR /&gt;
&amp;gt; style?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Do you want to affect existing text Objects when you change, or just have&lt;BR /&gt;
&amp;gt; the new settings apply to text objects you subsequently create?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; James&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/BELSHAN_JL&gt;</description>
      <pubDate>Fri, 14 Mar 2003 18:31:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303468#M65103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-14T18:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help with setting style &amp; font with VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303469#M65104</link>
      <description>&amp;gt; The co. I work for basically uses these 2 fonts in their drawings ...&lt;BR /&gt;
&lt;BR /&gt;
Don,&lt;BR /&gt;
&lt;BR /&gt;
It would be good to know what manual method is used to switch between the&lt;BR /&gt;
fonts.  If I use the "style" command in ACAD to change the font name from&lt;BR /&gt;
romand to romans.shx, all the text objects that have "Standard" style change&lt;BR /&gt;
font.  So does your company have separate styles defined for the two fonts?&lt;BR /&gt;
Or is all text "Standard"?&lt;BR /&gt;
&lt;BR /&gt;
After playing around some more with text, it seems to me like the best way&lt;BR /&gt;
to get 2 different fonts to "stick" is to have 2 styles called romanD and&lt;BR /&gt;
romanS, and have your macros set one or the other style as active...</description>
      <pubDate>Sat, 15 Mar 2003 12:41:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303469#M65104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-15T12:41:47Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303470#M65105</link>
      <description>OK James Thanks for the help.&lt;BR /&gt;
&lt;BR /&gt;
I did try setting  a D and an S style but that didn't seem to help either.&lt;BR /&gt;
&lt;BR /&gt;
Oh well!  I'll keep on trying.&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
DonB</description>
      <pubDate>Sat, 15 Mar 2003 16:18:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303470#M65105</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-15T16:18:00Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303471#M65106</link>
      <description>Sub ToggleActiveTextStyle()&lt;BR /&gt;
&lt;BR /&gt;
   Dim SDimScale As Double&lt;BR /&gt;
   SDimScale = ThisDrawing.GetVariable("dimscale")&lt;BR /&gt;
&lt;BR /&gt;
   ' if styles already exist, .Add just selects them&lt;BR /&gt;
   With ThisDrawing.TextStyles.Add("romanS")&lt;BR /&gt;
      .fontFile = "romanS.shx"&lt;BR /&gt;
   End With&lt;BR /&gt;
   With ThisDrawing.TextStyles.Add("romanD")&lt;BR /&gt;
      .fontFile = "romanD.shx"&lt;BR /&gt;
   End With&lt;BR /&gt;
&lt;BR /&gt;
   If ThisDrawing.ActiveTextStyle.Name = "romanS" Then&lt;BR /&gt;
      MsgBox "Changing to D"&lt;BR /&gt;
      ThisDrawing.TextStyles("romanD").Height = SDimScale * 0.1875&lt;BR /&gt;
      ThisDrawing.ActiveTextStyle = ThisDrawing.TextStyles("romanD")&lt;BR /&gt;
   Else&lt;BR /&gt;
      MsgBox "Changing to S"&lt;BR /&gt;
      ThisDrawing.TextStyles("romanS").Height = SDimScale * 0.09375&lt;BR /&gt;
      ThisDrawing.ActiveTextStyle = ThisDrawing.TextStyles("romanS")&lt;BR /&gt;
   End If&lt;BR /&gt;
&lt;BR /&gt;
End Sub</description>
      <pubDate>Sat, 15 Mar 2003 16:53:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303471#M65106</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-15T16:53:16Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303472#M65107</link>
      <description>this code (previous post) seems to work for me.   As I toggle back and&lt;BR /&gt;
forth, and create text, the old text never changes its height or font.  One&lt;BR /&gt;
consideration would be whether you care if you have different text styles.&lt;BR /&gt;
To me it doesn't seem like that big of a deal, after seeing more about how&lt;BR /&gt;
they work.&lt;BR /&gt;
&lt;BR /&gt;
Some stuff I learned about Text styles...&lt;BR /&gt;
1 - changing the font file of a text style automatically changes the display&lt;BR /&gt;
font of all text that uses the style.&lt;BR /&gt;
2 - changing the height of a text style does not change the height of&lt;BR /&gt;
existing text that uses the style.&lt;BR /&gt;
2a - however, changing the style of a text entity (in the Properties window)&lt;BR /&gt;
causes its height to change to that of the style.&lt;BR /&gt;
&lt;BR /&gt;
about #1, this is why it seems like your company must already be using&lt;BR /&gt;
multiple text styles in order to make different fonts.&lt;BR /&gt;
&lt;BR /&gt;
Good luck,&lt;BR /&gt;
James</description>
      <pubDate>Sat, 15 Mar 2003 17:12:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303472#M65107</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-15T17:12:46Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303473#M65108</link>
      <description>James&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot for your work on this and your help is certainly appreciated.&lt;BR /&gt;
The trouble with where I work is that the "Standard"  is loosely controlled&lt;BR /&gt;
with everyone getting there by their own method. But you're supposed to&lt;BR /&gt;
follow it in your drawings.&lt;BR /&gt;
I will try out your code and report back.&lt;BR /&gt;
&lt;BR /&gt;
Best Regards&lt;BR /&gt;
&lt;BR /&gt;
DonB</description>
      <pubDate>Sun, 16 Mar 2003 07:38:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303473#M65108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-16T07:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with setting style &amp; font with VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303474#M65109</link>
      <description>Hello again James&lt;BR /&gt;
&lt;BR /&gt;
Well I tried your code but I can't get it to work. It seems to get stuck on&lt;BR /&gt;
RomanS and won't change from that. When I get a chance I'll play around with&lt;BR /&gt;
it some more. Thanks for all your help in trying to resolve this problem.&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
DonB&lt;BR /&gt;
&lt;BR /&gt;
"DonB" &lt;DONB&gt; wrote in message&lt;BR /&gt;
news:48407A5698F9FA80228A4C65460FF230@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I've attached this code to be run from 2 different buttons, one for the&lt;BR /&gt;
&amp;gt; RomanD and the other for the RomanS. The co. I work for basically uses&lt;BR /&gt;
these&lt;BR /&gt;
&amp;gt; 2 fonts in their drawings and I was trying to automate the switching back&lt;BR /&gt;
&amp;gt; and forth. The code works some of the time but not all the time and I&lt;BR /&gt;
can't&lt;BR /&gt;
&amp;gt; figure out what's wrong. Can anyone help?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; The following code is in a module and the buttons work OK&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; '===============================&lt;BR /&gt;
&amp;gt; Option Explicit&lt;BR /&gt;
&amp;gt; Public SDimScale As Single&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; '-------------------------------------------------------------------&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ' ROMAN-D code&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Public Sub SetFontRomanD()&lt;BR /&gt;
&amp;gt; Dim objTextStyle As AcadTextStyle&lt;BR /&gt;
&amp;gt;     Set objTextStyle = ThisDrawing.TextStyles("standard")&lt;BR /&gt;
&amp;gt;    objTextStyle.fontFile = "romand.shx"&lt;BR /&gt;
&amp;gt;    SDimScale = ThisDrawing.GetVariable("dimscale")&lt;BR /&gt;
&amp;gt;    objTextStyle.Height = SDimScale * 0.1875               'set the font to&lt;BR /&gt;
a&lt;BR /&gt;
&amp;gt; height of 3/16"&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ' ROMAN-S code&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Public Sub SetFontRomanS()&lt;BR /&gt;
&amp;gt; Dim objTextStyle As AcadTextStyle&lt;BR /&gt;
&amp;gt;     Set objTextStyle = ThisDrawing.TextStyles("standard")&lt;BR /&gt;
&amp;gt;     objTextStyle.fontFile = "romans.shx"&lt;BR /&gt;
&amp;gt;     SDimScale = ThisDrawing.GetVariable("dimscale")&lt;BR /&gt;
&amp;gt;    objTextStyle.Height = SDimScale * 0.09375             'set the font to&lt;BR /&gt;
a&lt;BR /&gt;
&amp;gt; height of 3/32"&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt; '===============================&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; TIA&lt;BR /&gt;
&amp;gt; DonB&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/DONB&gt;</description>
      <pubDate>Tue, 18 Mar 2003 16:22:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303474#M65109</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-18T16:22:06Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303475#M65110</link>
      <description>&amp;gt;  It seems to get stuck on&lt;BR /&gt;
&amp;gt; RomanS and won't change from that.&lt;BR /&gt;
&lt;BR /&gt;
That shouldn't happen if you open a new DWG and run the code.&lt;BR /&gt;
If you're running it in an existing dwg, the only reason I can think that&lt;BR /&gt;
this might happen is that it already has style "romanS" in it, but with a&lt;BR /&gt;
different case (i.e. ROMANs)&lt;BR /&gt;
So, you could try making your IF-THEN case insensitive:&lt;BR /&gt;
&lt;BR /&gt;
Msgbox "The active style is " &amp;amp; ThisDrawing.ActiveTextStyle.Name&lt;BR /&gt;
If lcase$(ThisDrawing.ActiveTextStyle.Name) = "romans" Then&lt;BR /&gt;
   ...&lt;BR /&gt;
&lt;BR /&gt;
Good luck,&lt;BR /&gt;
James</description>
      <pubDate>Wed, 19 Mar 2003 05:04:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303475#M65110</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-19T05:04:44Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303476#M65111</link>
      <description>OK James&lt;BR /&gt;
&lt;BR /&gt;
I'll try that. I didn't know that I had to worry about the case.  I'll let&lt;BR /&gt;
you know.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Don&lt;BR /&gt;
&lt;BR /&gt;
"James Belshan" &lt;BELSHAN_JL&gt; wrote in message&lt;BR /&gt;
news:208446B9C42363B5C2E080C2D22B06C5@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt;  It seems to get stuck on&lt;BR /&gt;
&amp;gt; &amp;gt; RomanS and won't change from that.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; That shouldn't happen if you open a new DWG and run the code.&lt;BR /&gt;
&amp;gt; If you're running it in an existing dwg, the only reason I can think that&lt;BR /&gt;
&amp;gt; this might happen is that it already has style "romanS" in it, but with a&lt;BR /&gt;
&amp;gt; different case (i.e. ROMANs)&lt;BR /&gt;
&amp;gt; So, you could try making your IF-THEN case insensitive:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Msgbox "The active style is " &amp;amp; ThisDrawing.ActiveTextStyle.Name&lt;BR /&gt;
&amp;gt; If lcase$(ThisDrawing.ActiveTextStyle.Name) = "romans" Then&lt;BR /&gt;
&amp;gt;    ...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Good luck,&lt;BR /&gt;
&amp;gt; James&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/BELSHAN_JL&gt;</description>
      <pubDate>Wed, 19 Mar 2003 16:51:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/help-with-setting-style-amp-font-with-vba/m-p/303476#M65111</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-03-19T16:51:30Z</dc:date>
    </item>
  </channel>
</rss>

