ArcMap text formatting tags aren't working

7271
8
Jump to solution
05-01-2013 10:58 AM
EnriqueRamirez1
New Contributor II
I added a text box to a map and want to format certain parts of the text. 

I followed the the examples on how to change color but all that shows up is the actual syntax.  nothing changes.

for example,  <CLR red ="255">Depaul</CLR>  doesn't change the color red, it just reads as is?

is there something I am doing wrong? Using ArcMap 10.0

thanks
Enrique
Tags (2)
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor
Do any of the labels contain the characters "&" or "<"? If so, these are special characters that interfere with the formatting tags. You have to replace them with their character codes of &amp; and &lt; like this

Function FindLabel ([LABELFIELD])   NewString = Replace([LABELFIELD],"&","&amp;")     FindLabel = "<ITA>" & NewString & "</ITA>" End Function

View solution in original post

8 Replies
RobertBorchert
Frequent Contributor III
Here is the proper format

<clr red="255" green="0" blue ="0">Depaul</clr>

If you want it to simply be just red you can leave out the green and blue parameters.  If you want a custom color you include all three.

If your trying to customize labels based on Data Driven Pages you put the two parts on either size of the Data Driven pages label.


Hope this helps


I added a text box to a map and want to format certain parts of the text. 

I followed the the examples on how to change color but all that shows up is the actual syntax.  nothing changes.

for example,  <CLR red ="255">Depaul</CLR>  doesn't change the color red, it just reads as is?

is there something I am doing wrong? Using ArcMap 10.0

thanks
Enrique
0 Kudos
RobertBorchert
Frequent Contributor III
Oh, wait a minute what you did should work.

Try using '  instead of "

I added a text box to a map and want to format certain parts of the text. 

I followed the the examples on how to change color but all that shows up is the actual syntax.  nothing changes.

for example,  <CLR red ="255">Depaul</CLR>  doesn't change the color red, it just reads as is?

is there something I am doing wrong? Using ArcMap 10.0

thanks
Enrique
0 Kudos
EnriqueRamirez1
New Contributor II
I tried both, but it just prints out the syntax? 

It's a basic map that I added a text box to.  when I try to format color though Change Symbol button, all the text changes.  I just want certain words to be blue. 



Oh, wait a minute what you did should work.

Try using '  instead of "
0 Kudos
KenBuja
MVP Esteemed Contributor
Do any of the labels contain the characters "&" or "<"? If so, these are special characters that interfere with the formatting tags. You have to replace them with their character codes of &amp; and &lt; like this

Function FindLabel ([LABELFIELD])   NewString = Replace([LABELFIELD],"&","&amp;")     FindLabel = "<ITA>" & NewString & "</ITA>" End Function
EnriqueRamirez1
New Contributor II
That was it! Thanks. Would never have figured that out.

Enrique


Do any of the labels contain the characters "&" or "<"? If so, these are special characters that interfere with the formatting tags. You have to replace them with their character codes of &amp; and &lt; like this

Function FindLabel ([LABELFIELD])
  NewString = Replace([LABELFIELD],"&","&amp;")  
  FindLabel = "<ITA>" & NewString & "</ITA>"
End Function
RobertBorchert
Frequent Contributor III
Ok I I was trying it on a label text box.

I got it to work.  You are doing Insert > Text

Try doing it by just writing in your text.

The use Select Elements and right click on the text box and select properties.  Now make your adjustment here.

I just did it and it worked just fine.

I tried both, but it just prints out the syntax? 

It's a basic map that I added a text box to.  when I try to format color though Change Symbol button, all the text changes.  I just want certain words to be blue.
0 Kudos
KenBuja
MVP Esteemed Contributor
That was it! Thanks. Would never have figured that out.

Enrique


Glad to help. Don't forget to click the check mark to signify the question was answered.
0 Kudos
EnriqueRamirez1
New Contributor II
thanks again.  I clicked the green check mark.

Do you know if I can add hyperlinks in the same way? Say I not only want to change the color but I want to make the word a hyperlink.


Glad to help. Don't forget to click the check mark to signify the question was answered.
0 Kudos