David Miller Posted May 15, 2009 Posted May 15, 2009 I found the following code in the forums and it has been a big help! Makes numbers and letters different font sizes. return Field("Location").replace(/\d+/g,"<z newsize=\"6.1\">$&<z newsize=\"7.0\">"); Now we need to add font tracking to the mix. For example: numbers set to 6.1 pt and tracking at 2%, letters set to 7.0 pt and tracking 4%. Is there a way to do this or an I doomed to tagging a lot of addresses? Thanks! Dave Miller
invaricconsulting Posted May 15, 2009 Posted May 15, 2009 I'm not great with regular expressions such as the one being used here, but I believe you can just add the tracking tags in the strings before and after the regular expression match (dollar-ampersand) like this: return Field("Location").replace(/\d+/g,"<z newsize=\"6.1\"><tracking newsize=\"2\">$&<z newsize=\"7.0\"><tracking newsize=\"4\">");
David Miller Posted May 16, 2009 Author Posted May 16, 2009 That seemed to work great. YOU saved me a LOT of time. Seriously! Starting to get it... here is what if wound up using... if (Field("Location")=="No Location") LocationAddress='' else if (Field("Location")=="Chicago Office") LocationAddress='227 West Monroe Street Chicago, Illinois 606066-5096' //blah blah blah more -else if- statements for Location variables else LocationAddress=""; return LocationAddress.replace(/\d+/g,"<z newsize=\"6.1\"><tracking newsize=\"2\">$&<z newsize=\"7.0\"><tracking newsize=\"4\">"); Thanks, Dave Miller
Recommended Posts
Archived
This topic is now archived and is closed to further replies.