Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with TransferSpreadsheet method

Status
Not open for further replies.

jcarneir

Programmer
May 17, 2001
26
VE
When I use the docmd.TransferSpreadsheet method to export a tabla to an excell file I get an error If the path+filename is too long.

How I can fix this if I don't want to change the path?

Thx
 
you need to find the DOS version of the path.
In the original DOS system, files and directories were limited to lengths of 8 characters with a 3 character suffix (known as 8.3 format). With the introduction of 32 bit systems (starting at win95 - just!) this restriction was partially lifted. The limits of the names were increased (not sure what they are now, but have a look round & you'll find it), but they could not be totally removed as win 95 & 98 were based on the original DOS. So each file had 2 names, the visible name and the name the filing system used, still in the 8.3 format.
directories over 8 chars long were condensed to the 1st 6 chars then ~1, ~2, ~3, etc to make them unique. Filenames were treated in the same way, but just reduced their suffix to 3 letters, so C:\WindowsNT\Northwind.database.file would become C:\windo~1\northw~1.dat (or maybe .fil, not sure now!).
I am sure there are functions out there to lookup these filenames, but not sure what they are now.
I hope I've got you started, let me know how you get on.

Ben ----------------------------------
Ben O'Hara
bo104@westyorkshire.police.uk
----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top