Hi All,
I have following code which is not working
Declare Function GetShortPathName Lib "kernel32" _
Alias "GetShortPathNameA" (ByVal lpszLongPath As String, _
ByRef lpszShortPath As String, ByVal cchBuffer As Integer) As Integer
Dim lRetVal As Long, sShortPathName As String, iLen As Integer
Try
sShortPathName = Space(255)
iLen = Len(sShortPathName)
If Has_Space(sLongFileName) Then
lRetVal = GetShortPathName(sLongFileName, sShortPathName, iLen)
End If
GetShortName = Left(sShortPathName, lRetVal)
sShortPathName contains blank.