Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
[email protected] codeweb@gmail.com is offline
external usenet poster
 
Posts: 3
Default Automatic Path with Date

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.
  #2   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

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.


  #3   Report Post  
Posted to microsoft.public.word.newusers
janey janey is offline
external usenet poster
 
Posts: 28
Default Automatic Path with Date

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.


  #4   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Automatic Path with Date

Instead of naming it FileSaveAs() call it something else and run it from a
toolbar button or suitable keyboard shortcut.
or
Insert the FileSaveAs macro only in the template that requires it - and not
the normal template.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"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.




  #5   Report Post  
Posted to microsoft.public.word.newusers
janey janey is offline
external usenet poster
 
Posts: 28
Default Automatic Path with Date

I think I must be missing something!

I want to use this macro in my office templates only.
I started with just one of them e.g. Office1.dot (which I brought over from
Word 2003 to 2007).
I created a macro called FileSaveAs:

Sub FileSaveAs()
'
' FileSaveAs Macro
' Saves a copy of the document in a separate file
'
With Dialogs(wdDialogFileSaveAs)
If .Display Then
With ActiveDocument
.saveas .Name & " " & Format(Date, "yyyy-mm-dd")
End With
End If
End With
End Sub

I then closed the template and opened a new document based on it. When I
pressed Save and put in a file name, e.g. Test, I got a file called
"Document1 2010-02-28.docx

How do I get this to be: Test 2010-02-28.docx please?

When I have this right, do I have to put the same macro in my other office
templates individually?


"Graham Mayor" wrote in message
...
Instead of naming it FileSaveAs() call it something else and run it from a
toolbar button or suitable keyboard shortcut.
or
Insert the FileSaveAs macro only in the template that requires it - and
not the normal template.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"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.





  #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

Use:

Dim Fkill As String
Dialogs(wdDialogFileSaveAs).Show
With ActiveDocument
Fkill = .FullName
.SaveAs .Name & " " & Format(Date, "yyyy-mm-dd")
End With
Kill Fkill


--
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
...
I think I must be missing something!

I want to use this macro in my office templates only.
I started with just one of them e.g. Office1.dot (which I brought over
from Word 2003 to 2007).
I created a macro called FileSaveAs:

Sub FileSaveAs()
'
' FileSaveAs Macro
' Saves a copy of the document in a separate file
'
With Dialogs(wdDialogFileSaveAs)
If .Display Then
With ActiveDocument
.saveas .Name & " " & Format(Date, "yyyy-mm-dd")
End With
End If
End With
End Sub

I then closed the template and opened a new document based on it. When I
pressed Save and put in a file name, e.g. Test, I got a file called
"Document1 2010-02-28.docx

How do I get this to be: Test 2010-02-28.docx please?

When I have this right, do I have to put the same macro in my other office
templates individually?


"Graham Mayor" wrote in message
...
Instead of naming it FileSaveAs() call it something else and run it from
a toolbar button or suitable keyboard shortcut.
or
Insert the FileSaveAs macro only in the template that requires it - and
not the normal template.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"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.



  #7   Report Post  
Posted to microsoft.public.word.newusers
janey janey is offline
external usenet poster
 
Posts: 28
Default Automatic Path with Date

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.


  #8   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.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enter a date and then apply automatic date? Ruth_Rob New Users 2 January 1st 09 04:45 PM
automatic date icon in H&F producing an incorrect date Lucille Microsoft Word Help 2 December 9th 08 03:11 PM
Can an automatic document path be set up in Word? hvnbound Microsoft Word Help 2 June 7th 06 03:59 PM
date/time automatic update is off but date still updates. jocasam Microsoft Word Help 2 February 11th 06 03:50 PM
How do I set up automatic file path footers? Stuart Walker Microsoft Word Help 2 September 27th 05 03:25 AM


All times are GMT +1. The time now is 11:30 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"