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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell....SaveAS

Status
Not open for further replies.

chiuso2

MIS
Joined
Feb 22, 2002
Messages
58
Hi
i need to open a file and then to SaveAs it
OpenFile:
Shell "C:\windows\notepad.exe C:\MyFile"
Anybody knows how to Save it as txt file via code?
Maybe with API?
Thanks in advance
Mario
 
Try this:

stFile = "ThisFile.txt"
StoreFile (stFile)

Private Sub StoreFile(stFilename As String)
Dim stPutFile As String
stPutFile = "C:\SomeFolder\SomeOtherFolder\" & stFilename
Open stPutFile For Output As #1
DoCmd.Quit acSaveYes
MsgBox "Your file " & stFilename & " has been saved", vbOKOnly, "File saved"
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top