koden Posted January 2, 2007 Report Share Posted January 2, 2007 My macro copy this city name ballerup into T7 In another program it text type TRF.DEN.%T7% But this program want the city name with the first letter in upper case like this Ballerup. Is there a function that can change the first letter in T7 from lower to upper?? T7 can have many dif. city names. some are with the first letter as upper and some with lower. So this function should determine and change if it's lower. Quote Link to comment Share on other sites More sharing options...
blopib Posted January 2, 2007 Report Share Posted January 2, 2007 Hi koden I dont have a sollution for the lower or uppercase i ME but perhaps this could help you instead. If you have a list of the citynames, maybe you could import this to excel and use the function INITIAL, then use you're (T7) macro to text type it from excel into the other program. Just don't forget to copy the result in excel from the B-column and paste it into the C-column, use paste special and value, this is just to get rid off the formula in the B-column. I hope this can help. Quote Link to comment Share on other sites More sharing options...
kevin Posted January 2, 2007 Report Share Posted January 2, 2007 There is not a specific command to change the first letter to upper case. However, you can use existing macro commands to accomplish the same thing. Something like this may work. // Copy the first letter of T1 into T91 Variable Modify String: Copy Part of %T1% to %T91% // Set the first letter contained in T91 to upper case Variable Modify String: Uppercase %T91% // Copy from the second letter through the 99999999th letter Variable Modify String: Copy Part of %T1% to %T92% // Overwrite T1 with the T91 and T92 Variable Set String %T1% "%T91%%T92%" You will, however, have to write additional macro commands to determine when to leave the first letter lower-case. Quote Link to comment Share on other sites More sharing options...
koden Posted January 2, 2007 Author Report Share Posted January 2, 2007 Thanks I will try... .-) Quote Link to comment Share on other sites More sharing options...
koden Posted January 3, 2007 Author Report Share Posted January 3, 2007 Another problem in same fields... The program where i paste TRF.Den.%T7% won't accet this. I have to paste the full text TRF.Den.Ballerup before it accept. So..... I have a set variabel string T8 > TRF.Den. I copy the city name into T7. The city name can be several city names. In this example I use Ballerup. Then I need to modify T8 so it will end out with TRF.Den.Ballerup (modify T8 with T7 at the end of T8, and then use T8 to paste in my program) But how do I do that and which modify command do I use?? Right trim?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.