Re: How do I use macro/ other feature of word to save a new copy word

781 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Graham Mayor

23.03.2005, 02:16:5623.03.05
Tell us more about what you are doing so that a suitable method can be

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

My web site
Word MVP web site
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Random wrote:
> How do I use macro or some other feature of word to save a new copy
> of word doc each day. I need to make a document that Automatically
> arcives or saves a new copy of my word document each days .


23.03.2005, 12:19:1123.03.05
Is there something you're not sharing that would prevent File>Save As from
getting this done? |:>)

BTW- Please post on one area only and return to it to check for replies. You
posted the same question here and in General questions 3 minutes apart.
Thanks for helping others help you!

HTH |:>)


23.03.2005, 20:39:0323.03.05
Hello Graham Mayor
A friend of mine made an equipment status report in MS Word it had the
following features:
First you would go to the file the doc was saved in.
Then you would open the doc and update the text or just review it.
When you were finished you could just close it or saved your changes just
like you would in any word doc.
The doc would automatically save itself as what ever you originally named it
with the current date.
The next day you would open the same doc however the date would change to
the current date and when you closed it you would now have two documents for
example one file would be named equipment status march 22, 2005 and the
other would be named equipment status march 23, 2005. Each new day you
opened the last doc it would create a new document with the same name but
with the current date.
At the end of the week you would have 7 documents for each of the 7 day, the
same would happen for the month and year.
You would be able to open and view any of the documents however you could
only make changes to the current day’s document.

Graham Mayor

24.03.2005, 07:23:1924.03.05
The best I can come up with is a macro which you need to save in the
document's template (or in Add the macro to a toolbar button.
The first time you run the macro it saves the document with the filename
"My File March 24, 2005 001.doc" (date is the current date) in the folder
you designate where indicated. You can change "My File" for something more
meaningful also where indicated. The macro also creates a file
'settings.txt' in the root of the C: drive.
Next time the macro is run, the end number is incremented and the date
changed according to the current date. Thus you always know which is the
most recent file and on which date it was saved from the filename.


Sub SaveNumberedVersion()
Dim strPath, strFile As String

strPath = "D:\My Documents\Test\" 'set path
strFile = "My File " 'set filename

Order = System.PrivateProfileString("C:\Settings.Txt", _
"MacroSettings", "Order")
If Order = "" Then
Order = 1
Order = Order + 1
End If

System.PrivateProfileString("C:\Settings.txt", "MacroSettings", _
"Order") = Order

ActiveDocument.SaveAs FileName:=strPath & strFile & _
Format((Date), "MMMM dd, yyyy ") & Format(Order, "00#")
End Sub

Allen antworten
Dem Autor antworten
0 neue Nachrichten