up vote 0 down vote favorite
share [g+] share [fb]

How to convert selected text to sentence case?

like

How Are YOU

to this

How are you

link|improve this question

45% accept rate
@ChrisF - Word 2007 and notepad both – metal gear solid Jan 9 '10 at 17:12
feedback

2 Answers

^!v::  
clipboard:=ClipboardAll  
StringLower, string, clipboard  
StringTrimLeft, output, string, 1  
StringLeft, FirstChar, string, 1  
StringUpper, FirstChar, FirstChar  
sendraw %FirstChar%%output%  
Return  

Horribly hacky, but it works :)

Proof: How are you

link|improve this answer
lol @ the String trim. XD. Creative. – RJFalconer Jan 9 '10 at 17:51
I write my worst code before caffeine, but it always works! I bet somebody's gonna come and tell me there's a function for it anyway :P – Phoshi Jan 9 '10 at 17:53
it's not working it's giving this output ^!v:: clipboard:=clipboardall stringlower, string, clipboard stringtrimleft, output, string, 1 stringleft, firstchar, string, 1 stringupper, firstchar, firstchar sendraw %firstchar%%output% return: – metal gear solid Feb 4 '10 at 8:21
@Jitendra; That's correct output. Unfortunately I didn't have time to support multiple lines. (It's capitalising the ^ in ^!v, thus you see no capitalisation) – Phoshi Feb 4 '10 at 8:49
I want to change "How Are YOU" to "How are you" and this script is not working. – metal gear solid Feb 4 '10 at 18:25
show 3 more comments
feedback

In word 2003, select the text, "format" menu, "change case", "sentence case"

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.