Showing posts with label Renumber Word Table Macro. Show all posts
Showing posts with label Renumber Word Table Macro. Show all posts

Sunday, 23 November 2014

SmartTable Number Update

A Free Document Productivity Tool for Word

There have been a number of improvements to SmartTable Number, the tool that renumbers and tidies tables in Word.

The highlights are:
  • Ability to handle multi-row headers.
  • Suffix codes e.g “7a, 7b, 7c..” added for rows that follow from the one above.
  • Continue numbering from a previous table.

Handle Multi-row headers

SmartTable Renumber is designed to start numbering from the first row after the header. Previously, only single row headers were supported. Having worked on some complex tables lately, I added logic to handler multi-row headers.

You can now use the “Repeat Header Rows” option in the Table Layout tab to define multi-row headers. Numbering will start from the first regular row after the header.

Using the "Repeat Header Rows" sets a flag on each header that ensures the header gets repeated on each page.  The numbering routine tests for this flag and skips header before starting to assign numbers.

Suffix Codes

The routine now numbers rows that have a blank cell in column 2.  It does this by appending “a, b, c…” to the previous row number.  


In this example, since there is no text in column two, the routine has added the suffix a, b, c... to the previous row. 




To switch this on, a new entry in the table control list has been added.  A value of S adds this suffix.  If a value of “N” is entered, rows with a blank column 2 are not numbered.




I needed this logic to handle some complicated tables where the second cell was sometimes a header for several rows that follow.

Continue numbering from a previous table

To continue numbering from the previous table type ”-1” in the first number cell and then select SmartTable Number.

The routine will go to the previous table and get the last number (and prefix, if any) from the previous table and continue numbering.

The “-1”refers to the number of tables to go back, If you type “-2”, the routine will get the number and any prefix from the table before the previous one.  This allows me to insert small tables between the main numbering sequence


In this example -1 has been added to the first row of the second table.  










After selecting SmartTable Number, the numbering from the previous table has been copied down.












I needed this logic to handle several tables that needed to have a common numbering. 

The routine is not smart enough to automatically renumber a series of tables, you have to do them one at a time. This isn't a limitation of coding, its more of a limitation in the way Word works. There are no spare fields in the table properties to permanently store the relationship between tables, this makes building repeatable process tricky.

Summary

This is an update to SmartTable Number.  The latest copy of all Tool code can be found in the Downloads tab.

Saturday, 22 February 2014

SmartTable Number

A Free Document Productivity Tool for Word

SmartTable Number  renumbers table rows using a range of numbering strategies defined by the user. It also removes unwanted blank rows from the table.

SmartTable Number is the main processing routine for the SmartTable suite of tools described in the previous post.


A control menu allows the user to indicate whether or not a table should be renumbered, and what numbering style should be used.


Example - Before and after using simple numbering. Blank Lines have been removed the rows renumbered

Many other numbering formats are supported




Friday, 21 February 2014

SmartTable Functions

SmartTable: Advanced table editing tools for Word that make using tables quick, easy and efficient. The tools are: 

SmartTable Number: Renumbers table rows using a range of numbering strategies defined by the user. It also removes unwanted blank rows from the table. SmartTable Number is the main processing routine for the SmartTable suite of tools.

SmartTable Control: Controls whether or not the table should be renumbered, and the style of renumbering to apply. The style values including prefixes, separators and number formats.

SmartTable Insert: Inserts a set of blank lines into the table ready for quick entry.  The routine handles some quirky insert scenarios too.

SmartTable Delete: Places the standard row delete function on an easy to use shortcut key. It can be used in conjunction with SmartTable Insert.

SmartTable Cell Format: Formats the text in the cell by applying “.” characters to paragraphs while preserving any other punctuation that may be present. 
This is useful when you have to tidy a bunch of bullet points captured quickly in a cell.

SmartMove Up/Down: This tool moves a single paragraph up/down inside a table cell, and is useful for changing the order of bulleted items in a list. It also supports the standard reordering tools that move paragraphs up/down in regular text or rows up/down in table

SmartTable Section Format:  Table sections provide headings to structure table content into logical groups.  Select a table row as the standard section format, and later, automatically apply this format to another row with a single shortcut key.  The Format can be applied to any table in the document.
This saves time and ensures consistent look and feel within a document.

SmartTable New: Define a table as the master table for a document. Later, insert a new empty table that looks the same, with the same headers and column widths.  
This is used when you need the same table design in several parts of the same document.

SmartTable Align: Define a table as the master table for a document. Later, select another table have the master table column widths and headings applied to it. The routine adds any new columns from the master into the target table while preserving the content already present.  Columns deleted from the master table will also be removed. 
This useful when the same table layout is used throughout a document, and changes to this layout need to be replicated to all.

SmartTable Browse: Browse through a table section by section to review grouped table content.

These tools will be posted over the next few weeks.