<?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: Convert Text Element to Proper Case in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/convert-text-element-to-proper-case/m-p/392541#M10475</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your example is what I believe is called Sentence Case, not Proper Case/Title Case.&amp;nbsp; Proper Case (corrected for Roman Numerals) would have been "Class III Wetlands", not "Class III wetlands".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For Sentence Case to capitalize just the first word of a sentence you would normally just use in VB.Net:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;' Split string based on periods&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim s As String = "CLASS III WETLANDS.&amp;nbsp; CLASS IV WETLANDS."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim sentences As String() = s.Split(New Char() {"."c})&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;' Use For Each loop over sentences to change case&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim sentence As String&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;s = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For Each sentence In sentences&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = s &amp;amp; UCase(Left(LCase(sentence), 1)) &amp;amp; "."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;s.Replace("..", ".")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The output of string s would be:&amp;nbsp; "Class iii wetlands.&amp;nbsp; Class iv wetlands."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course, that does not work for sentences that include Roman numerals, the pronoun "I", proper names or sentences that trail off with "...".&amp;nbsp; If you want case sensitivity like you get when you use Word, that level of sophistication will not be achieved using simple coding techniques and is beyond the scope of what I could help you with.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jul 2013 19:20:02 GMT</pubDate>
    <dc:creator>RichardFairhurst</dc:creator>
    <dc:date>2013-07-15T19:20:02Z</dc:date>
    <item>
      <title>Convert Text Element to Proper Case</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convert-text-element-to-proper-case/m-p/392539#M10473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Quick question: through vb.net is there a way to say, loop through selected text elements (in layout view) and convert the text to proper case? "CLASS III WETLAND" becomes "Class III wetland" (ignore the roman numerals, I'm expecting to have to manually modify that...as it would likely become 'iii' anyways.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was hoping for a quick ArcObjects solution or possible Python solution. I'm an amateur at programming, so bear with me (I have a better understanding of VB.NET, but I do know that Python might be the faster route, if something like this exists).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 16:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convert-text-element-to-proper-case/m-p/392539#M10473</guid>
      <dc:creator>deleted-user-VeC5jUIlNXtq</dc:creator>
      <dc:date>2013-07-15T16:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Text Element to Proper Case</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convert-text-element-to-proper-case/m-p/392540#M10474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://support.microsoft.com/kb/312897"&gt;http://support.microsoft.com/kb/312897&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 18:44:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convert-text-element-to-proper-case/m-p/392540#M10474</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2013-07-15T18:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Text Element to Proper Case</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/convert-text-element-to-proper-case/m-p/392541#M10475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your example is what I believe is called Sentence Case, not Proper Case/Title Case.&amp;nbsp; Proper Case (corrected for Roman Numerals) would have been "Class III Wetlands", not "Class III wetlands".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For Sentence Case to capitalize just the first word of a sentence you would normally just use in VB.Net:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;' Split string based on periods&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim s As String = "CLASS III WETLANDS.&amp;nbsp; CLASS IV WETLANDS."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim sentences As String() = s.Split(New Char() {"."c})&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;' Use For Each loop over sentences to change case&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim sentence As String&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;s = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For Each sentence In sentences&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = s &amp;amp; UCase(Left(LCase(sentence), 1)) &amp;amp; "."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;s.Replace("..", ".")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The output of string s would be:&amp;nbsp; "Class iii wetlands.&amp;nbsp; Class iv wetlands."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course, that does not work for sentences that include Roman numerals, the pronoun "I", proper names or sentences that trail off with "...".&amp;nbsp; If you want case sensitivity like you get when you use Word, that level of sophistication will not be achieved using simple coding techniques and is beyond the scope of what I could help you with.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 19:20:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/convert-text-element-to-proper-case/m-p/392541#M10475</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-07-15T19:20:02Z</dc:date>
    </item>
  </channel>
</rss>

