Saving Macro

M

mrodwell

I have been asked if it is possible to have a default setting when
saving a document. There are wanting the first part of each doc to
have the year/month/day then a description of some kind..is there
anyway of setting this so it defaults.

Mat
 
W

Word Heretic

G'day (e-mail address removed) (mrodwell),

Yes, this is possible, but we require much more info on the exact
circumstances to offer more detailed help.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


mrodwell reckoned:
 
M

matthew.rodwell

Hi there Steve....all i want is for when the docs are saved no matter
what they are for the date to be placed at the begining of the name,
then a part that allows them to place a description of there own.

eg. 15/12/04_Letter to Client.doc

obvouisly i want it to change with the current date so that people know
what day the file was created on....

Mat
 
W

Word Heretic

G'day (e-mail address removed),

In the template for that document type:

Public Sub FileSaveAs()
'replace this with your lets make a filename
'and assign a path and Activedocument.SaveAs
'to it
MsgBox "yeah"
End Sub

Assign Ctrl+S in that template to this macro as well.

You may also need a

Public Sub FileSave()
FileSaveAs
End Sub

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


(e-mail address removed) reckoned:
 
M

matthew.rodwell

But which bit adds the auto date the beginning...i need the file name
to change as the date changes you see....please help

Mat
 
G

Greg

Maybe something like:

Sub FileSaveAs()
With Dialogs(wdDialogFileSaveAs)
.Name = Format(Date, "yyyy mmm dd")
.Show
End With
End Sub

Note the date format is 2005 Mar 03. For some reason the format
yyyy/mm/dd won't work. Does anyone else know why?
 
G

Graham Mayor

Forward and back slashes are reserved characters that are not allowed in
filenames. Others include * : ? " < > |
It's a hangover from DOS.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Greg

Graham,

Doh! I now have a hand print planted on my forehead :) Thanks for
showing me the forrest while I was tripping over a tree.
 
M

matthew.rodwell

Thanks you guys that is exactly what i wanted....thanks for your
help..can't believe its is so simple
 

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