Function ScinderChaine(chaine As String, Optional l As Double = 40, Optional c As String = "*") As Variant
Dim oRegExp As Object, Matches As Object, i As Byte, sep As Byte, T()
Set oRegExp = CreateObject("vbscript.regexp")
With oRegExp
.Global = True
.MultiLine = True
.Pattern = "\s"
Set Matches = .Execute(chaine)
If Matches.Count > 0 Then
For i = 0 To Matches.Count - 1
If Matches.Item(i).firstindex <= l And Matches.Item(i).firstindex > sep Then _
sep = Matches.Item(i).firstindex
Next i
End If
ReDim T(1)
T(0) = IIf(sep > 0, Left(chaine, sep), chaine)
If Len(T(0)) < l Then T(0) = T(0) & _
Application.WorksheetFunction.Rept(c, l - Len(T(0)))
T(1) = IIf(sep > 0, Trim(Right(chaine, Len(chaine) - sep)), "")
If Len(T(1)) < l * 2 Then T(1) = T(1) & _
Application.WorksheetFunction.Rept(c, l * 2 - Len(T(1)))
End With
ScinderChaine = Application.Transpose(T)
End Function