Write macro to save copy as with date in filename
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Write macro to save copy as with date in filename
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
Thanks,
RON C
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
This can be done easily with Macro Scheduler from MJT Net.
And syntax files are available to do editing in TextPad.
And syntax files are available to do editing in TextPad.
Hope this was helpful.............good luck,
Bob
Bob
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
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.
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.
Hope this was helpful.............good luck,
Bob
Bob
Write macro to save copy as with date in filename
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.
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.
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
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.
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.
Hope this was helpful.............good luck,
Bob
Bob
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."rechmbrs wrote:WOW.
Been away from computer as my daughter had my first grandchild and had other things to do.
Thanks,
RON C
Mazal Tov!