The following should work
Code:
Sub Test()
MsgBox GetCaption(ActiveDocument.Name)
End Sub
Function GetCaption(sName As String)
Dim sCaption As String
Dim iPos As Integer
If IsNumeric(Left(sName, 1)) = True Then
iPos = InStr(1, sName, " ")
sCaption = Mid(sName, iPos + 1)
Else
sCaption = sName
End If
sCaption = Left(sCaption, InStrRev(sCaption, "."))
GetCaption = sCaption
End Function