Hi I want to create code/macro that saves a document to a specific file directory (eg c:\mydocuments\matters\"") and then gives it an automatic name using a numbering convention (eg format(date, "ddmmyy") & "username" & automatic number). I want it to look for the last number saved and then save the new doc with the next number available. (eg file is called 300106da123 [da being username] and then next user saves and gets 300106bc124). Thank you for your help. B -- btcPosted from - http://www.officehelp.in
btc wrote: > Hi > > I want to create code/macro that saves a document to a specific file > directory (eg c:\mydocuments\matters\"") and then gives it an > automatic name using a numbering convention (eg format(date, > "ddmmyy") & "username" & automatic number). I want it to look for > the last number saved and then save the new doc with the next number > available. (eg file is called 300106da123 [da being username] and > then next user saves and gets 300106bc124). > > > Thank you for your help. > B See http://word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm for the part about the sequential number. It looks like you have the expression needed for the rest of the file name, assuming you have some way to determine the current user name (and don't use quotes around "username" unless you want that literal word in the file name). -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.