--
John Pryor FBII
www.dorset-arms.co.uk
The Dorset Arms at Withyham
Sussex, England
The Best Food in Sussex - Probably!
Sub SmallCaps()
Dim o As Object
Dim sCap As Integer, _
lCap As Integer, _
i As Integer
Dim testStr As String
For Each o In Selection
With o
If Application.IsText(.Value) Then
lCap = .Characters(1, 1).Font.Size
sCap = Int(lCap * 0.85)
'Small caps for everything.
.Font.Size = sCap
.Value = UCase(.Value)
testStr = .Value
'Large caps for 1st letter of words.
testStr = Application.Proper(testStr)
For i = 1 To Len(testStr)
If Mid(testStr, i, 1) = UCase(Mid(testStr, i, 1)) Then
.Characters(i, 1).Font.Size = lCap
End If
Next i
End If
End With
Next o
End Sub
--
Posted via CNET Help.com
http://www.help.com/