This page updated 29 Feb 2010
Version note: Applies to TMG 8 & 9
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 file in Microsoft Word format. 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 Word 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.
Topics Included in this Article |
|
Why would you want to use a macro? | |
What do we mean by the term "macro"? | |
What do you have to do to get a Word macro | |
How to use the macro after you have it in place |
The notes in the pages linked below 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 providing a copy of the macro I use, for readers who may prefer to use it, perhaps with their own modifications, and also 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.
A macro can do almost any editing or formatting task that you what to do repeatedly. For example, I found I consistently made the following changes to TMG's Journal reports:
Change top and bottom margins, and spacing of footer from bottom of page.
Underline the "Generation xxxx" headings, and remove a blank line after each heading.
Remove blank lines TMG inserts immediately before and after the report title.
The macro I now use makes all these changes to any Journal report I create in TMG with the click of a button on my Word toolbar. You could of course add or delete steps, or modify the specific settings, to suit your preferences, or adapt the techniques to do entirely different tasks.
It is a series of instructions for the program (in this case Microsoft Word) to produce a desired result. The program executes these instructions just as if you were manually making the various operations. 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.
The macro can then be used to repeat the same steps whenever you choose, typically by attaching it to a toolbar button, or assigning a set keystroke shortcut to it. In our case, you would then open a report created by TMG in your word processor, activate the macro, and it would make all the edits without further effort on your part. If as you review the report you find you need to modify some data and re-create the report in TMG, the macro easily repeats the same edits on the fresh copy of the report.
I have provided two ways for readers to obtain a macro that makes the formatting changes described above, either by using the macro I have created, or by recording their own. Readers may be able to edit the macro I provide, or record their own using the steps as a guide in creating your own sequence of steps. See the articles listed below for details.
Downloading Terry's Word Macro – provides a copy of my macro, and directions for importing it into Word and making minor edits. This may be the easiest way to obtain a workable macro, but making significant changes to the macro's features can be daunting. This macro is for Word 2007 and later only.
Recording Your Own Macro – provides directions for recording your own macro, and provides step-by-step instructions for recording my macro, which may be useful as a starting point for recording your own with different features. These instructions apply to Word 2007 and later only.
Once you have downloaded and installed, or recorded, your macro, using is is pretty straightforward:
Create the type of report the macro was designed for in TMG. If you downloaded my Word 2007 macro, or recorded your own using essentially similar steps, select a Journal Report.
Specify that the report is to be created as a file in your word processor's format. In the lower half of the Report Definition screen, in the Report Destination box, choose "Save to," then specify Microsoft Word" in the "File type" drop-down, or a different file type if you use another word processor. Specify a file name in the "File name" field.
Once you have generated the report, open it in your word processor, either with the "Open file?" dialog that appears when the report is completed, or by using the normal File > Open command in your Word Processor.
ReigelRidge Home | Terry's Tips Home | Contact Terry |
Copyright 2000- by Terry Reigel