- #Word set macro shortcut keys how to
- #Word set macro shortcut keys update
- #Word set macro shortcut keys code
#Word set macro shortcut keys code
This code has a hyphen ( wdSeparatorHyphen) as the separator between the chapter number and the sequential table number - you can change it to something else.Other changes you might want to consider: ).Insert Where:=Selection.Range, RichText:=True Position:=wdCaptionPositionAbove, ExcludeLabel:=0Ī("corporate_table" _ Selection.InsertCaption Label:="Table", TitleAutoText:="", Title:="", _ NumberStyle = wdCaptionNumberStyleArabic ' Insert Table from Building Blocks in template, insert auto caption with chapter numbering Close the Visual Basic window and save the template (don’t close it yet).Other suggested changes are listed below the macro.
You’ll need to change the name of the BuildingBlockEntries from “ corporate_table” to the name of your Building Block. In between Sub Table() and End Sub, paste the code you just copied.Copy the code in the yellow box below - copy it all some is not displayed fully, so make sure you drag your cursor over the entire set of code when you copy it.Click the drop-down box for Macros in and change the setting to your template (e.g.Type Table in the Macro Name field at the top of the Macros window.
#Word set macro shortcut keys how to
(Here’s how to turn it on in Word 2007 and Word 2010.) Step 3: Create a macro that inserts the table and its caption Delete the table from your template, if required.Changing the saved location is CRITICAL as you want to share this table with all users of your template as far as I know, Building Blocks.dotx is a local file on each person’s local machine and it’s not easy to transfer building block entries from one machine to another. If your template is not listed, then you didn’t create the table in your template - start again at Step 1: Set up the table. Change the Save in location from the default Building Blocks.dotx to your template (e.g.In the Create New Building Block dialog box, give the selected table a unique name (e.g.Select Save selection to Quick Part gallery.Step 2: Save the table as a Building Block
#Word set macro shortcut keys update
UPDATE 2016: You *can* get the caption inserted with a Quick Table - you just have to select the table AND its caption when creating it and the caption is added automatically (and adjusts the table numbering) when you insert the Quick Table. So this solution takes Quick Tables a couple of steps further. While Quick Tables are an option, you won’t get the caption inserted with them.
if they’re in section 2, you want the tables they insert in section 2 to be numbered Table 2-1, Table 2-2 etc.). The caption is to include the chapter number and a sequential caption number (e.g. Your template uses outline heading numbering, so you want a table caption to be inserted at the same time as you insert the table. merge cells) without those modifications affecting anything else. Once they’ve inserted a table, the author has to be able to modify it (e.g. The tables all need to be formatted the same - same header row shading, height alignment and style same border color and width same table row height, alignment and style. So you need to add something to the template that allows them to press a couple of keys and get both a preformatted table and an automated caption inserted. You need to make it easy for your authors to insert many tables in their documents. If you are using Word 2003 or earlier, I hope to share a much longer macro with you in a few weeks that does something similar but without the formatting. NOTE: These instructions only work for Word 2007 and later they use Building Blocks, which are only available in these versions of Word.