Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
path strings
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 Jack |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
path strings
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. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "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 Jack |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! * |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find and replace numeric strings in larger text strings | Excel Worksheet Functions | |||
Contatenate folder path strings, how ? | Excel Worksheet Functions | |||
How to find number of pairs of strings from list of strings? | Excel Worksheet Functions | |||
hyperlink navigation path path wrong in Excel 2003 | Excel Discussion (Misc queries) | |||
how to change absolute path to relative path | Excel Worksheet Functions |