Hi Kevin, So remember that your szOpenTable is a variable, sot to add an extension to this your have to add another text:
szOpenTable = szOpenTable + "_trk" But if you do it in this way you'll add the extension at the end, after the existing filetype: szOpenTable = "C:\Program Files\MapInfo\MyTableFile.txt" szOpenTable = szOpenTable + "_trk" szOpenTable now holds the value "C:\Program Files\MapInfo\MyTableFile.txt_trk". You might consider removing the existing file extension, adding your extension and then adding the file extension again, depending on what your are trying to do. szExt = Right$(szOpenTable, 4) szOpenTable = Left$(szOpenTable, Len(szOpenTable) - 4) + "_trk" + szExt Be adviced that this is a simple way of removing the file extension. You might considering using a better way as this doesn't take into consideration that the filetype extension might on be 2 characters instead of 3. HTH, Peter ------------------------------------------------------------------------------------------------ Peter Horsb�ll M�ller, GIS Udviklingskonsulent / GIS-Developer Kampsax A/S - GIS Software & Solutions Rugaardsvej 55, 5000 Odense, DK tel: +45 6313 5013, dir:+45 6313 5008, fax: +45 6313 5090 mailto:[EMAIL PROTECTED] www.kampsax-gis.dk and www.kampsax.dk Authorized MapInfo Partner & Distributor in Denmark and Norway. ------------------------------------------------------------------------------------------------ Klik ind p� http://www.kortal.dk og se det hele lidt fra oven! Check http://www.kortal.dk and have a look at Denmark from above! ----- Videresendt af Peter M�ller/Kampsax - 16-10-2002 08:12 ----- "Kevin Slover" Til: Directionsmag <[EMAIL PROTECTED]> <Kevin.Slover cc: @noaa.gov> Vedr.: MI-L FileOpenDlg Question 15-10-2002 15:06 I am using the FileOpenDlg to open a file, register the file, and then doing a "Commit As" to save the file under a different name to be able to manipulate the file. What I am wondering is if there is a way to save the file as the original file name, plus an extension. Example: szOpenTable = FileOpenDlg(ProgramDirectory$() + ... Then, I would like to save the table as szOpenTable_trk. Basically, I wish to keep the file name, add an extension, and save. And ideas? -- LTJG Kevin Slover, NOAA GIS Specialist/Oceanographer NOAA/TPC/TSB/Storm Surge Unit 11691 SW 17th Street Miami FL 33165 W (305) 229-4456 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 3580 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 3601
