TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:Create a table MSword using a macro (long) From:DHICKEY -at- ALIS -dot- COM Date:Fri, 20 Aug 1999 11:42:18 -0400
Greetings!
> >> Can any of you MSWord experts tell me if you can create table
> >> "styles" like paragraph styles. I am trying to create a corporate
> Why not create a macro that creates the table and formats
I've been chastised because I didn't include the instructions on how to do
this, so here's how to create a table macro and assign it to a toolbar
button.
Creating the Macro file
1. Open your document with the template you are creating attached to it.
2. Place the cursor in the document where'd you like to create this table.
2. Open the Macro sub-menu from the Tools menu.
3. Select Record New Macro. The Record Macro dialog box opens.
5. Enter a name for your macro in the Macro Name field. You cannot insert
spaces in the macro name, so your macro name may look something like
CreateTable.
6. Select the template in which you want to store the macro (the template
you are creating).
7. Add a description in the Description field (optional).
8. Click the Toolbar button. The Customize dialog box appears displaying the
name of your macro. You could add this macro to a toolbar right now by
dragging the macro in the Commands panel to a toolbar in your current
document. For the purpose of this email, I'd rather do this later.
9. Select the template you are working on from the Save As field and click
Close.
Recording the Macro file
Once you clicked Close on the Customize dialog box, a toolbar appears called
Stop Recording and displays two buttons: the Stop button and the Pause
button. The macro recorder is now recording your every selection, but if you
need to pause the recording to get your bearings, you can click the Pause
button. Only click the Stop button when you've finished recording your
macro.
1. Start creating your table.
Make sure you perform each step accurately 'cause the camera's on! If you
make a mistake, you can always stop the recording and start over, or edit
the macro script by hand later.
2. Once you finish your table (complete with adding text, making size
adjustments and applying the proper paragraph/character styles), click the
Stop button. The macro is now recorded!
Adding the Macro to a Toolbar
Now that you have your macro, you can add it to a toolbar of your choice.
You can either add it to an existing toolbar or create a toolbar of your
own.
1. Right click on any toolbar in your Word document.
2. Select Customize from the pop-up menu. The Customize dialog box appears.
3. Select the Commands tab and scroll down the Categories panel to Macros.
4. Select the macro from the Commands panel (CreateTable).
5. Drag the macro from the Commands panel to the toolbar of your choice.
6. Select the template you are working on from the Save in field.
7. Right-click on the new macro button. You can add your own custom name,
add an image, or select both image and text to appear on the button.
8. Once you've customized your macro button, click Close on the Customize
dialog box.
I use the Customize dialog box to add the styles I use most often to
customized toolbars, making it easier to mark paragraphs and characters with
the proper styles.
Whew! I hope that was complete enough! But if you have any other questions,
please email me.
I think I'm going to plunk all this information down into a Word document
and it to my Web CV. I'll add screen grabs and some more information about
creating toolbars, customizing buttons, and editing macros.
If anyone is interested, I'll post a note to the list when the file is on my
Web site.
--
Be seeing you,
Dave
---------------------------------------------
John David Hickey
Montreal, Quebec, Canada eh?
They say that the pen is mightier than the sword.
But if you miss a deadline, you'd better bring the sword.
---------------------------------------------
Don't confuse my opinion with my employer's.
Each exists in blissful ignorance of the other.