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

File Naming

Status
Not open for further replies.

mhypolite

Vendor
Feb 5, 2005
59
KY
Good day all, I am looking for a way to control filenames when crating documents on office apps like word and excel, where when you attempt to save a document a name is generated automatically for e.g., a file might be named 2279832. it is for a law firm, I saw it in another firm but don’t know what they used to control the documents names like that


Any help will be appreciated, thanks
 
There are certainly ways to generate a filename. However, the user could always change it. What is your criteria?

Gerry
 
Hi Gerry, I just wanted an automatic name generated, for the user even if they have the option to change it or not, something like a 6 digit alpha numeric number for example

Thanks for the help in advance
 
Again...what is your criteria?

You can have the SaveAs dialog come up, prefilled with a name....but...

On Close of the document?
On user doing a Save?
On user doing a SaveAs?
Some other event?

Gerry
My paintings and sculpture
 
Hi Fumie i want it On user doing a Save, that will be the best option

thanks
 
You could have a folder with the name 2279832. Then show filename and path in the footer.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
The folder is a good idea, but each file has a diffrent name, they want the actual file to be called 2279832 for example, any document they do up when saving it should have a name generated there for them already it is just for them to hit save and the document is stored
 
You should be able to do that in your code, just setup whatever formula to calculate the file name in your code, and send that information to the "save as" prompt when the user clicks the save button. For instance, I setup one database in Access which defaults the file name as the date in this format: yyyymmdd and then "01" "02" or "03", etc, depending upon whether 01 or 02 already exists. I just use a file listing table in the database for my purposes, but you might would need to see if the particular file already exists in your application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top