path strings
On Sat, 31 Jan 2004 10:05:27 -0000, "Bob Phillips"
wrote:
Jack,
Not that I know of. Shouldn't be difficult though, it is just first 6 chars
& ~1. Check if that already exists if so make it ~2 etc.
Actually, there IS one way, if you have the Microsoft Scripting
Library installed, the FileSystemObject can do it for you (make sure
that you only use this with a saved workbook or it'll barf on the
ThisWorkbook.FullName line):
Sub ShowShortName()
Dim fso As Object
'The file to check
Dim fil As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set fil = fso.GetFile(ThisWorkbook.FullName)
MsgBox "Short path = " & fil.ShortPath _
& vbCrLf & "Short Name = " & fil.ShortName
Set fil = Nothing
Set fso = Nothing
End Sub
"Jack Clift" wrote in message
...
I am wondering if there is a function that returns /
converts the 'old' path format (i.e. maximum of 8
characters) from the new (long file name) format e.g.
c:\documents and settings\administrator\desktop\
=
c:\docume~1\admini~1\desktop
Thanks
---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *
|