Markieren musst du hierbei auch, ...
19.04.2016 19:27:15
Luc:-?
…Addi,
damit bist du flexibel; anderenfalls müsstest du ggf immer eine Konstante austauschen:
Sub Kapitaelchen()
Const plusSize As Single = 1, liGB$ = "[A-ZÄÖÜ]"
Dim pix As Long, liPos, xP, xV As Variant, xZ As Range
For Each xZ In ActiveWindow.RangeSelection
On Abs(xZ = "") GoTo nx
xV = StrConv(xZ, vbUnicode): xV = Left(xV, Len(xV) - 1)
For Each xP In Split(xV, Chr(0))
pix = pix + 1
If xP Like liGB Then liPos = liPos & " " & CStr(pix)
Next xP
liPos = Split(LTrim(liPos)): xZ = UCase(xZ)
For pix = LBound(liPos) To UBound(liPos)
With xZ.Characters(CInt(liPos(pix)), 1)
.Font.Size = .Font.Size + plusSize
End With
Next pix
nx: pix = 0: liPos = Empty
Next xZ
End Sub
Gruß, Luc :-?