By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,201 Members | 957 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,201 IT Pros & Developers. It's quick & easy.

save file without show save window

P: 36
hi for every one

i want to save text file in specified bath without show the save window

i write code that save file but that code show save window :

Expand|Select|Wrap|Line Numbers
  1. CommonDialog1.FileName = "invoices.txt"
  2. CommonDialog1.ShowSave
  3.  
  4. Call FileCopy(App.Path & "\invoices.txt", CommonDialog1.FileName)
i want to save file in specified bath without show the save window .

thank you .
Mar 7 '07 #1
Share this Question
Share on Google+
3 Replies


P: 62
Don't ask from user for destination path u can give ur self destination path.
but it is not good approach.
[ code]
Call FileCopy(App.Path & "\invoices.txt", strDestinationPath)
[/code]
Mar 7 '07 #2

hariharanmca
100+
P: 1,977
hi for every one

i want to save text file in specified bath without show the save window

i write code that save file but that code show save window :

Expand|Select|Wrap|Line Numbers
  1. CommonDialog1.FileName = "invoices.txt"
  2. CommonDialog1.ShowSave
  3.  
  4. Call FileCopy(App.Path & "\invoices.txt", CommonDialog1.FileName)
i want to save file in specified bath without show the save window .

thank you .

You can use File System Object to solve your Problem
Mar 7 '07 #3

Expert 5K+
P: 8,434
hi for every one

i want to save text file in specified bath without show the save window

i write code that save file but that code show save window :

Expand|Select|Wrap|Line Numbers
  1. CommonDialog1.FileName = "invoices.txt"
  2. CommonDialog1.ShowSave
  3. Call FileCopy(App.Path & "\invoices.txt", CommonDialog1.FileName)
i want to save file in specified bath without show the save window.
The "save window you are seeing is nothing to do with your "save" to the text file. It's the CommonDialog1 control which is prompting the user to select a file. That's what the common dialogue control is for - to allow you to show common user dialogues such as a file chooser, colour chooser, font chooser and so on. To avoid this, just don't use it. Provide your file name some other way.

Oh, and by the way - the word is "path", not "bath".
Mar 8 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.