Changing the extension of a file in Explorer

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
 
K

Ken Snell [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top