Changing the extension of a file in Explorer

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Before importing a file I would like to change its
extension to .txt . Is it possible to do this in Access ?

Thanks
Steve
 
Yes, but not directly in a macro. You must use a VBA function to do this.

Public Function ChangeFilextension(strOriginalPathFileName As String)
Name strOriginalPathFileName As strOriginalPathFileName & ".txt"
End Function

This will append .txt to the end of the filename.
 
Back
Top