Page 1 of 1

Write macro to save copy as with date in filename

Posted: Wed Nov 03, 2004 9:54 pm
by rechmbrs
Can someone help me write a Save-CopyAs macro that inserts the date/time in the filename? I know zero about macros.

Thanks,
RON C

Posted: Wed Nov 03, 2004 10:29 pm
by Bob Hansen
This can be done easily with Macro Scheduler from MJT Net.

And syntax files are available to do editing in TextPad.

Posted: Thu Nov 04, 2004 12:41 am
by rechmbrs
Can't the macro language in TP do it? Is there a freeware equilvalent to Macro Scheduler?

RON C :D

Posted: Thu Nov 04, 2004 3:51 am
by Bob Hansen
You could use TextPad macro to insert Date, Time into document.
Format it into a filename format and then copy it to clipboard.
Then delete section inserted into the document.
Then you could save file and paste filename from clipboard.

Sounds good, except.......when you play back the macros, the clipboard contents becomes hardcoded in the macro. The macro cannot adapt to the current clilpboard contents. So you will always have the date entered that matches the date you recorded the macro.

Try Macro Scheduler for free trial period. Similar terms to TextPad.

Write macro to save copy as with date in filename

Posted: Sat Nov 06, 2004 12:37 am
by Grizzly
I've found if you create a macro inside a document that has already been saved, then the clipboard contents won't get hard coded inside the macro.

I don't have a clue how one would insert the date and time into the title via a macro but maybe this will help get past the hard coded information from the clipboard. I hope. :o

Posted: Sat Nov 06, 2004 3:39 am
by Bob Hansen
Will look something like this:

Macro contents:
==================
CTL-END to go to end of page
ENTER to advance one line
Edit, Insert, Short Date for filename trailer
Replace "/" with nothing for filename trailer
Home to get to start of line.
Type FileName_, End, .Suffix to surround date with filename and extension, like the following.

FileName_1152004.txt

Now select line, Copy to Clipboard.
Now delete line.
File,Save As.
Paste from clipboard into File name location.
ENTER to Save.

Macro done
=====================
Perhaps it may be necessary to include the Path at the front of the core filename.

Posted: Sat Nov 06, 2004 3:52 am
by Grizzly
Bob, you are just too cool for words. <grin>
Seriously, I sure hope the original poster for this question is still following the link.

Posted: Wed Nov 10, 2004 10:03 pm
by rechmbrs
WOW.

Thanks for the suggestion on how to build the macro. I'll try to do it soon.

Been away from computer as my daughter had my first grandchild and had other things to do. :D :D

Thanks,
RON C :)

Posted: Fri Nov 12, 2004 6:40 pm
by boldan
rechmbrs wrote:WOW.

Been away from computer as my daughter had my first grandchild and had other things to do. :D :D

Thanks,
RON C :)
I have 10 grandchildren... so far :-) When I got my first, somebody asked me: "What do you do to have a grandchild?" I answered: "You work 5 minutes, then wait for 20 years."

Mazal Tov!

Posted: Fri Nov 12, 2004 7:12 pm
by rechmbrs
I don't remember 5 minutes of work.
:wink: :wink:


RON C :D :D