View Single Post
  #6   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Automatic Path with Date

Replace the line

.SaveAs Format(Date, "yyyy-mm-dd") & " " & .Name

with

.SaveAs .Name & " " & Format(Date, "yyyy-mm-dd")

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"janey" wrote in message
...
May I also ask what the macro would be to have:

"File Name 2010-02-26.docx"

"janey" wrote in message
...
I was very interested in this reply as I save documents in this way so it
will save me having to put the date in each time I create a document.

However, is there a way of NOT running this macro - e.g. if I am creating
a template which does not need to have the date in the name?



"Doug Robbins - Word MVP" wrote in message
...
Use a macro containing the following commands:

With Dialogs(wdDialogFileSaveAs)
If .Display Then
With ActiveDocument
.SaveAs Format(Date, "yyyy-mm-dd") & " " & .Name
End With
End If
End With

If you create the macro with the name of Sub FileSaveAs() in your
normal.dot template or in an add-in, it will run whenever the
FileSaveAs command is used.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

wrote in message
...
I have some questions hopefully someone can assist.

I want to save my word documents by default in the d:\path location
with the following format

"2010-02-26 File Name.doc "– I would like to insert the date
automatically.

Appreciate your assistance.