Discussion Locked

creating a Macro

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am trying to create a macro in Word that will save a document in 2 differnt loactions as 2 different names. In one location it will be saved as the same name overwriting the documnet that was in it's place. The second save location I would like it to be saved as the current date. I tried recording this macro but it appears as if it is only doing half of what I want. Can someone point me in the right direction?

5 replies

by bfilmfan

You'll need to write a VB script to accomplish that task.

Check this thread for a similiar discussion.

https://www.techrepublic.com.com/5208-6239-0.html?forumID=42&threadID=152240&start0

by mikelazz

That thread doesn't have what I'm looking for. I just need to know if is is possible to have a macro save a document with a variable name such as the current date and how to do it.

by mikelazz

I have the macro almost set up the way I want it. I just need to know if and how to make the name of the second document default to the current date.

by mikelazz

never mind I found it. I needed to format the save location like this:

ActiveDocument.SaveAs FileName:=Format(Date, "dd-mm-yy") + "_" + Format(Time, "hh-mm-ss")

This discussion is closed to new replies.