#1
|
||||
|
||||
Can I record more to add on to a recorded Macro?
I'm trying to relearn how to create macros in MS Word, after a hiatus of fifteen or so years. Back around the turn of the century I played around with macros in Word 97, but only got as far as learning how to record them, and then make some minor tweaks to the recorded VBA code.
Now I'm running Word 2003, and have recorded a new version of the old macro I used with Word 97 back around the year 2000 or so. What it does is open and resize a number of files so that four of them are opened side-by-side, like four columns of text in the Word Window, and a couple more are minimized into little tab-like bars at the bottom of the window. I'd like to be able to add another file or two that would also automatically open, resize and minimize. I'm wondering if there's a way to append to a recorded macro, by recording more commands. Of course I could just re-record the entire macro from scratch, adding in the commands to include the new files. But before I try that, I thought I'd check to see if the option exists to continue recording more commands onto the tail-end of an already saved macro. I suppose I'm going to have to bite the bullet and eventually learn how to write my own VBA code, aren't I? But I'm in my seventies now, with a failing heart, so it doesn't look like I'll be around that much longer, so I may never make it that far. Will in Seattle a.k.a. "Clueless" |
#2
|
|||
|
|||
Will,
No. Recording macros is a one shot affair. However if you open the VB Editor and look at the recorded code you may be able to add the necessary code to the existing code. |
#3
|
||||
|
||||
Thanks, Greg. I'll try my hand at that. It seems that since my recorded macro opens a series of five or so files, I should be able to copy as section of VBA code for one of those files, changing the name of the file to be opened, and then tacking the edited code onto the end, don't you think?
Anyway, it's worth a try. As long as I save my experimental code under a new name, I don't have anything to lose, do I? Will in Seattle a.k.a. "Clueless" |
#4
|
||||
|
||||
It depends what is in the macros. Without knowing that it might be better to create a third macro e.g.
Code:
Sub MyMacro() Call MacroName1 Call MacroName2 End Sub To see how that works try the following http://www.gmayor.com/installing_macro.htm Code:
Sub MyMacro() Call MacroName1 Call MacroName2 End Sub Sub MacroName1() MsgBox "This is MacroName1" End Sub Sub MacroName2() MsgBox "This is MacroName2" End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
append, how to, recording macros |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel 2013 Record Macro greyed out | av8r | Excel | 7 | 02-17-2016 08:04 PM |
Using skip record as well as if, then, else | azza | Mail Merge | 5 | 10-11-2014 11:25 PM |
Recorded audio (record slide show) won't play in older versions | Landy | PowerPoint | 0 | 03-03-2012 03:14 PM |
avoid duplicete record and merge the record with the existed record | hemant.behere | Excel | 0 | 01-10-2012 02:53 AM |
how do you record a macro | boogers | Office | 1 | 10-25-2011 05:19 AM |