Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Sync-opy Sync-opy is offline
external usenet poster
 
Posts: 5
Default Automatically date stamp filename when save?

Is it possible to have Word automatically save a doc under a new filename
with a current date - time stamp automatically appear in the new filename.
I'm having difficulty juggling different versions of a master doc and the
"Save as version" option just isn't cutting it.

Thanks!
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Robert M. Franz (RMF) Robert M. Franz (RMF) is offline
external usenet poster
 
Posts: 1,741
Default Automatically date stamp filename when save?

Hi Sync-opy

Sync-opy wrote:
Is it possible to have Word automatically save a doc under a new filename
with a current date - time stamp automatically appear in the new filename.


See for instance:

http://groups.google.com/group/micro...35f528 842a44


I'm having difficulty juggling different versions of a master doc and the
"Save as version" option just isn't cutting it.


_That_ really does not surprise me: you definitely do *not* want to mix
master documents and Word's internal versions feature. Either one is
difficult at best, prone to corrupt your documents if handled badly --
together, I don't think you will find many people wanting to test this
combo ... :-)

Greetinx
Robert
--
/"\ ASCII Ribbon Campaign | MS
\ / | MVP
X Against HTML | for
/ \ in e-mail & news | Word
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Automatically date stamp filename when save?

The macro at http://www.gmayor.com/save_numbered_versions.htm will do that.
Do not use the master doc facility. It is fatally flawed and will eventially
corrupt your work.
Word can handle huge documents as single files.
--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Is it possible to have Word automatically save a doc under a new
filename with a current date - time stamp automatically appear in the
new filename. I'm having difficulty juggling different versions of a
master doc and the "Save as version" option just isn't cutting it.

Thanks!



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Sync-opy Sync-opy is offline
external usenet poster
 
Posts: 5
Default Automatically date stamp filename when save?

Thanks! That was exactly what I was looking for. I actually navigated to
and downloaded your add-in macros and I am using that. One more question
though: is it possible to have the filename include the time of the save in
addition to the date and version number?

Thanks again! this is so helpful compared to the other options!

"Graham Mayor" wrote:

The macro at http://www.gmayor.com/save_numbered_versions.htm will do that.
Do not use the master doc facility. It is fatally flawed and will eventially
corrupt your work.
Word can handle huge documents as single files.
--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Is it possible to have Word automatically save a doc under a new
filename with a current date - time stamp automatically appear in the
new filename. I'm having difficulty juggling different versions of a
master doc and the "Save as version" option just isn't cutting it.

Thanks!




  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Automatically date stamp filename when save?

Yes adding the time is easy enough.
Define another string at the start

Dim strTime As String

Then under the line
strDate = Format((Date), "dd MMM yyyy")
add
strTime = Format((Time), " hhmm")
then near the end locate and change the following lines thus:

'Define the new version filename
strVersionName = strPath & "\" & strFile & " - Version " & _
Format(iCount, "00#") & " - " & strDate & strTime & ".doc"

Do not use a colon between hours and minutes in the line strTime=


--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Thanks! That was exactly what I was looking for. I actually
navigated to and downloaded your add-in macros and I am using that.
One more question though: is it possible to have the filename include
the time of the save in addition to the date and version number?

Thanks again! this is so helpful compared to the other options!

"Graham Mayor" wrote:

The macro at http://www.gmayor.com/save_numbered_versions.htm will
do that. Do not use the master doc facility. It is fatally flawed
and will eventially corrupt your work.
Word can handle huge documents as single files.
--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Is it possible to have Word automatically save a doc under a new
filename with a current date - time stamp automatically appear in
the new filename. I'm having difficulty juggling different versions
of a master doc and the "Save as version" option just isn't cutting
it.

Thanks!





  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Sync-opy Sync-opy is offline
external usenet poster
 
Posts: 5
Default Automatically date stamp filename when save?

thanks that worked great!

"Graham Mayor" wrote:

Yes adding the time is easy enough.
Define another string at the start

Dim strTime As String

Then under the line
strDate = Format((Date), "dd MMM yyyy")
add
strTime = Format((Time), " hhmm")
then near the end locate and change the following lines thus:

'Define the new version filename
strVersionName = strPath & "\" & strFile & " - Version " & _
Format(iCount, "00#") & " - " & strDate & strTime & ".doc"

Do not use a colon between hours and minutes in the line strTime=


--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Thanks! That was exactly what I was looking for. I actually
navigated to and downloaded your add-in macros and I am using that.
One more question though: is it possible to have the filename include
the time of the save in addition to the date and version number?

Thanks again! this is so helpful compared to the other options!

"Graham Mayor" wrote:

The macro at http://www.gmayor.com/save_numbered_versions.htm will
do that. Do not use the master doc facility. It is fatally flawed
and will eventially corrupt your work.
Word can handle huge documents as single files.
--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Is it possible to have Word automatically save a doc under a new
filename with a current date - time stamp automatically appear in
the new filename. I'm having difficulty juggling different versions
of a master doc and the "Save as version" option just isn't cutting
it.

Thanks!




  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Sync-opy Sync-opy is offline
external usenet poster
 
Posts: 5
Default Automatically date stamp filename when save?

Hi Graham,

After many months of using your Save Numbered Versions macro (it has been a
lifesaver!), I have one more question in terms of its alteration. I have
tried without success to accomplish this on my own. Basically, is there a
way to alter the code such that the saved file would be named in this manner:
Filename - Date Time - Version 00#
Instead of:
Filename - Version 00# - Date Time

I ask simply because when looking up the most recent file in my windows
folder, it would be easier to sort by name and have the most recent file at
the top or bottom of the list. As it is now, because the version # starts
over for each subsequent date I save, the list is sorted by Version # first,
the date, making it more difficult to easily pick out the most recent file.

In any case, this macro has made my life so much easier and I thank you!

Sync

"Graham Mayor" wrote:

Yes adding the time is easy enough.
Define another string at the start

Dim strTime As String

Then under the line
strDate = Format((Date), "dd MMM yyyy")
add
strTime = Format((Time), " hhmm")
then near the end locate and change the following lines thus:

'Define the new version filename
strVersionName = strPath & "\" & strFile & " - Version " & _
Format(iCount, "00#") & " - " & strDate & strTime & ".doc"

Do not use a colon between hours and minutes in the line strTime=


--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Thanks! That was exactly what I was looking for. I actually
navigated to and downloaded your add-in macros and I am using that.
One more question though: is it possible to have the filename include
the time of the save in addition to the date and version number?

Thanks again! this is so helpful compared to the other options!

"Graham Mayor" wrote:

The macro at http://www.gmayor.com/save_numbered_versions.htm will
do that. Do not use the master doc facility. It is fatally flawed
and will eventially corrupt your work.
Word can handle huge documents as single files.
--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Is it possible to have Word automatically save a doc under a new
filename with a current date - time stamp automatically appear in
the new filename. I'm having difficulty juggling different versions
of a master doc and the "Save as version" option just isn't cutting
it.

Thanks!




  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Automatically date stamp filename when save?

The filename is setup in the line:

strVersionName = strPath & "\" & strFile & " - Version " & _
Format(iCount, "00#") & " - " & strDate & ".doc"

You can re-order that to give you the required filename:

strVersionName = strPath & "\" & strFile & " - " & strDate & _
" - Version " & Format(iCount, "00#") & ".doc"

However if you simply change this, the resulting filename will not be
changed as an earlier line

intPos = InStrRev(strFile, " - Version") 'Mark the version number

locates the old version number which allows the macro to strip everything
from this point ready to redefine the filename later.. Version would now be
in the wrong place in the string, so you can change that line to

intPos = InStr(strFile, " - ") 'Mark the version number

(Note the use of InStr rather than InStrRev also)

which will find the first hyphen surrounded by spaces. Note that you cannot
use a hyphen surrounded by spaces in your filenames or the results will be
unpredictable. One of the reasons I used the original order was the hope
that Version would be unique in the filename and could be used as a market
to redefine the filename.


--

Graham Mayor - Word MVP

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



Sync-opy wrote:
Hi Graham,

After many months of using your Save Numbered Versions macro (it has
been a lifesaver!), I have one more question in terms of its
alteration. I have tried without success to accomplish this on my
own. Basically, is there a way to alter the code such that the saved
file would be named in this manner: Filename - Date Time - Version 00#
Instead of:
Filename - Version 00# - Date Time

I ask simply because when looking up the most recent file in my
windows folder, it would be easier to sort by name and have the most
recent file at the top or bottom of the list. As it is now, because
the version # starts over for each subsequent date I save, the list
is sorted by Version # first, the date, making it more difficult to
easily pick out the most recent file.

In any case, this macro has made my life so much easier and I thank
you!

Sync

"Graham Mayor" wrote:

Yes adding the time is easy enough.
Define another string at the start

Dim strTime As String

Then under the line
strDate = Format((Date), "dd MMM yyyy")
add
strTime = Format((Time), " hhmm")
then near the end locate and change the following lines thus:

'Define the new version filename
strVersionName = strPath & "\" & strFile & " - Version " & _
Format(iCount, "00#") & " - " & strDate & strTime & ".doc"

Do not use a colon between hours and minutes in the line strTime=


--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Thanks! That was exactly what I was looking for. I actually
navigated to and downloaded your add-in macros and I am using that.
One more question though: is it possible to have the filename
include the time of the save in addition to the date and version
number?

Thanks again! this is so helpful compared to the other options!

"Graham Mayor" wrote:

The macro at http://www.gmayor.com/save_numbered_versions.htm will
do that. Do not use the master doc facility. It is fatally flawed
and will eventially corrupt your work.
Word can handle huge documents as single files.
--

Graham Mayor - Word MVP

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


Sync-opy wrote:
Is it possible to have Word automatically save a doc under a new
filename with a current date - time stamp automatically appear in
the new filename. I'm having difficulty juggling different
versions of a master doc and the "Save as version" option just
isn't cutting it.

Thanks!



  #9   Report Post  
puzzlelogic puzzlelogic is offline
Junior Member
 
Posts: 0
Default

[quote=Graham Mayor;246552]

Hi - I realise this is quite an old post but is there a way to limit the save function if the document hasn't changed so that repeated running of the macro does not generate multiple similar copies? Maybe using the Document.Saved Property?
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
Can I put a code on a document that will date stamp the document? bill Microsoft Word Help 1 July 21st 06 08:05 PM
date stamp changes Barb Microsoft Word Help 1 May 20th 06 12:52 AM
insert date automatically changes previous dates to new date? Christopher92 Microsoft Word Help 2 May 5th 06 04:50 PM
Can Date Automatically Appear in Document Name Mike Microsoft Word Help 2 December 27th 05 09:54 AM
When automatically inserting the current date, it's 3 days behind? Christy Microsoft Word Help 3 December 16th 05 08:11 PM


All times are GMT +1. The time now is 07:58 PM.

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

About Us

"It's about Microsoft Word"