CAPS TO smallcase

Is there a simple command or key sequence to convert a sentence or paragraph typwed in CAPS to small case and the other way around?

Two sets of reports I have to fill in MUST BE DONE ALL CAPS. The rest are usual- but this means if I don’t remember to hit the “caps lock” key at the right time, it COME OUT LIKE THIS AND i THINK IT LOOKS STUPID. oR- I type all small case and I have to go back and retype.

Windows & Word suggestions. But it should be something that works with many Windows and/or Word varients.

Nothing universal (that I know of) but Word should allow you to select the text, and then choose “all caps” or “uppercase.” (Sorry I’m not more specific–I’m on a Mac w/o Word at the moment.)

In Word, select the text, then hold down the shift key and press F3. It toggles between, all lower case, all caps, and capitalized, so you may have to press it twice.

The other way to get at that command in Word is Format - Change Case. Note that several more options are supported from the command menu than with the [Alt][F3] shortcut.

If you don’t have access to Word for some reason, there’s also an HTML command that does the same, although I can’t remember it or find it at the moment.

You could set up an HTML file, copy your document into it, and convert the case with Javascript, but that would be silly. If you’re going to write code, you can do case conversion in a single command using Perl, Awk, Sed, Python, and probably a dozen other things.

Regardless, using anything but Word would compromise formatting information and probably be useless to the OP.

In Word, go to tools, customize, commands. CLick on format, then scroll down to the change case/all caps buttons. Holding down the alt key, drag the buttons to the toolbar. They work marvelously for all types of case changing needs.

Sort of irrelevant, but I’ll mention it anyway in case someone else finds it useful.

A while back, I had the task of converting a customer name and address database from ALL CAPS to Sensible Smart Case; there’s a VB native function called VBProperCase, but it wasn’t flexible enough; we needed something that:
-Used Proper Case on most words
-Rendered certain known abbreviations in full upper case
-Wrote surnames such as McTavish and O’Flaherty this way
-Rendered postal codes (any substring containing a number) fully in upper case.
-left small words such as ‘of’, ‘in’ etc completely in lower case.

So I wrote a custom VB function to handle it; here it is (it’s a bit rough and ready, but it works surprisingly well):


Public Function SmartCase(ConvertStr As String) As String
Dim mPointer As Integer
Dim mletter As Integer
Dim mtemploop As Integer
Dim mWord As String
Dim mchar As String

If ConvertStr = "" Then
    SmartCase = " "
    Exit Function
End If

mPointer = 0
'loop through entire string
Do
    mWord = ""
    'loop to get the next word
    Do
        mPointer = mPointer + 1
        mWord = mWord + Mid(ConvertStr, mPointer, 1)
    Loop Until InStr(" /-,.(){}[]+&@", Mid(ConvertStr, mPointer, 1)) > 0 Or (mPointer > Len(ConvertStr))
    'process the word:
    
    'Default word conversion:
    mletter = 0
    Do
        mletter = mletter + 1
        If InStr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", Mid(mWord, mletter, 1)) > 0 Then
            mWord = (Mid(mWord, 1, mletter - 1)) & UCase(Mid(mWord, mletter, 1)) & LCase(Mid(mWord, mletter + 1, Len(mWord) - 1))
            mletter = Len(mWord) + 1
        End If
    Loop Until mletter > Len(mWord)
    
    'Conditional conversions:
    'Celts Mc~ and O'~
    If (Mid(mWord, 1, 2) = "Mc") Or (Mid(mWord, 2, 1) = "'") Then
        mWord = UCase(Mid(mWord, 1, 1)) & LCase(Mid(mWord, 2, 1)) & UCase(Mid(mWord, 3, 1)) & LCase(Mid(mWord, 4, Len(mWord) - 2))
        '(capitalise first and third letter, but not the rest)
    End If
    
    'Small words - do not capitalise at all unless it is the first word in the string
    If (InStr("-A-An-And-At-In-Is-Or-The-Of-", "-" & Trim(mWord) & "-") > 0) And ((mPointer - Len(mWord)) > 0) Then
        '(hyphens for Jack-in-the-Box and also as delimiters - NB: you can customise this list)
        mWord = LCase(mWord)
    End If
    
    'Common abbreviations - capitalise entirely
    If InStr("-Pb-Hb-Whs-", "-" & Trim(mWord) & "-") > 0 Then
        '(hyphens as above NB: my abbreviations are for Paperback, Hardback and Warehouse, but you can customise them)
        mWord = UCase(mWord)
    End If
    
    'Words containing a numeric character - capitalise entirely
    For mtemploop = 0 To 9
        If InStr(mWord, Trim(Str(mtemploop))) > 0 Then
            mWord = UCase(mWord)
        End If
    Next
    
SmartCase = SmartCase & mWord
Loop Until mPointer > Len(ConvertStr)

End Function