Terry's TMG Tips

Using Word Processor Macros to Format TMG Reports

This page created 20 Feb 2001; minor updates 17 Mar 2005

Version note: Applies to TMG 6 & 7

TMG provides a substantial number of options to format the reports it generates, but it still may not satisfy the preferences of all users. I commonly generate ancestor and descendant narratives in TMG, using the capability to produce a MSWord for Windows file. Even after adjusting all the available options in TMG I still find myself making a number of format changes each time to get the reports just the way I like them before I send them to others. I've found it very convenient to use a macro in MSWord to make those changes. After attaching that macro to a button on the Word toolbar, I can make all those formatting changes with a single click.

This article is in response to requests from others for suggestions on how to create similar macros. These notes deal specifically with formatting and macros in Microsoft Word – other word processors probably have similar capability but the specifics would have to be adapted as needed. I am not providing a copy of the macro itself, because users with different versions of Word are likely to have a problem using it, and because it is very difficult to modify the functions in a macro by editing it directly. Instead, I am providing a set of instructions for recording the macro, so users can modify the steps as desired, and then record their own macro in the version of Word they are using.

What Can the Macro Do?

I found I consistently made the following changes to TMG's Journal reports:

  1. Change top and bottom margins, and spacing of footer from bottom of page.

  2. Underline the "Generation xxxx" headings, and remove a blank line after each heading.

  3. Remove blank lines TMG inserts immediately before and after the report title.

  4. Change the footer so it has a graphic line above, my name left, page number centered, date in the desired format right, and a smaller font.

  5. Reformat endnotes to a smaller font, left justified, and in two columns.

  6. Add a box at the end of the report with a note reminding people to respect the privacy of any living persons (when my report includes any).

The macro I now have makes all these changes to any Journal report I create in TMG with the click of a button on my MSWord toolbar. You could of course add or delete steps, or modify the specific settings, to suit your preferences.

What is a Macro?

It is a series of instructions for the program (in this case MSWord) to produce a desired result. While those with sufficient talent can write macros directly in programmer's language, us mortals find it much easier to use the program's macro recording feature. This way, we just go through the desired steps in the program manually, and the program creates the necessary macro language record for us. If you are not familiar with recording macros in MSWord, my article on Recording Macros in MSWord may help.

Steps to Record a Sample Macro

The specific steps that you would record depend on exactly what you want to accomplish. The steps below are those required to make the formatting changes described above. They illustrate a number of useful techniques, and should be helpful as a guide in creating your own sequence of steps.

These instructions use the commands in MSWord97; minor adjustments may be required for other versions.
 

A. Adjust Margins and Footer Spacing

B. Change Generation One, Two, etc. to Underlined

C. Delete the Extra Spacing After the Headings

D. Remove the Blank Lines Before and After the Report Title

E. Add the Footer

Rather than editing the footer generated by TMG, I turn off footers in the Report Definition screen, and create it from scratch in the macro.

F. Format the Endnotes

G. Add the Privacy Notice Text Box

1. I ended up putting this in a separate macro, since I don't use it every time.

2. This is intended to copy a box with some standard text as a notice at the end of the report. Before you can do these steps, you need to save an otherwise empty Word document with the desired text box. To create that text box in the empty document, choose Insert / Text Box, drag the cross-shaped cursor to create the box near the bottom of the page, and type in your desired text. Then choose Format / Text Box, and on the Position tab, after Vertical choose Page (this sets the box relative to the page, so it won't "float" when you insert it.) Save the document.

 

Credits – Thanks to Cheri Casper, who developed the outline of steps I used as a basis for this article.


ReigelRidge Home
Terry's Tips Home
Contact Terry

 

My new book, A Primer for The Master Genealogist, is now available.

Details are available here.

 

Copyright 2000-2008