Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2015, 06:07 AM
Clueless in Seattle's Avatar
Clueless in Seattle Clueless in Seattle is offline Can I record more to add on to a recorded Macro? Windows XP Can I record more to add on to a recorded Macro? Office 2003
Novice
Can I record more to add on to a recorded Macro?
 
Join Date: Jan 2012
Posts: 26
Clueless in Seattle is on a distinguished road
Question 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"
Reply With Quote
  #2  
Old 05-23-2015, 06:02 PM
gmaxey gmaxey is offline Can I record more to add on to a recorded Macro? Windows 7 32bit Can I record more to add on to a recorded Macro? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

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.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #3  
Old 05-24-2015, 09:16 PM
Clueless in Seattle's Avatar
Clueless in Seattle Clueless in Seattle is offline Can I record more to add on to a recorded Macro? Windows XP Can I record more to add on to a recorded Macro? Office 2003
Novice
Can I record more to add on to a recorded Macro?
 
Join Date: Jan 2012
Posts: 26
Clueless in Seattle is on a distinguished road
Default

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"
Reply With Quote
  #4  
Old 05-25-2015, 01:21 AM
gmayor's Avatar
gmayor gmayor is offline Can I record more to add on to a recorded Macro? Windows 7 64bit Can I record more to add on to a recorded Macro? Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
where MacroName1 and 2 are the names of your macros.
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
Reply With Quote
Reply

Tags
append, how to, recording macros



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I record more to add on to a recorded Macro? Excel 2013 Record Macro greyed out av8r Excel 7 02-17-2016 08:04 PM
Can I record more to add on to a recorded Macro? 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
Can I record more to add on to a recorded Macro? how do you record a macro boogers Office 1 10-25-2011 05:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft