**Date:** March 30, 2000

**MLRA OFFICE 6 TECHNICAL NOTE NO. 5**

**SUBJECT:** SOI -- Macro to Format Map Unit Descriptions

[Purpose.]{.underline} To transmit instructions for installing and
running a macro to be used with map unit descriptions generated from
NASIS.

[Effective Date.]{.underline} This technical note is effective when
received.

[Background.]{.underline} The macro was developed for use in Word 97 to
automatically apply formatting to map unit descriptions generated from
NASIS. It quickly converts text-only files to formatted documents that
are easier to read and that have a more presentable and professional
appearance.

[Filing Instructions.]{.underline} File after MLRA Office 6 Technical
Note No. 4. Discard the previous tabulation sheet and insert the current
tabulation sheet.

J. CAMERON LOERCH

MLRA Office Leader

Attachment

DIST: MO6 Soil Survey Project Leaders

Jim Borchert, NRCS, SSPL, Fort Morgan, CO

Doug Ramsey, NRCS, SSPL, Cortez, CO

Mike Petersen, NRCS, ArSS, Greeley, CO

> William Dollarhide, NRCS, MLRA Leader, Reno, NV
>
> Chuck Gordon, NRCS, MLRA Leader, Bozeman, MT
>
> Richard Schlepp, NRCS, MLRA Leader, Salina, KS
>
> Cleveland Watts, NRCS, MLRA Leader, Bismarck, ND
>
> Hayes Dye, NRCS, MLRA Leader, Phoenix, AZ
>
> Michael Golden, NRCS, MLRA Leader, Temple, TX
>
> Ken Scheffe, NRCS, Asst. State Con., RI&A, Albuquerque, NM
>
> William Broderson, NRCS, State Soil Scientist, Salt Lake City, UT
>
> Darrell Schroeder, NRCS, State Soil Scientist, Casper, WY
>
> Eric Vinson, NRCS, MLRA Leader, Davis, CA
>
> Chad McGrath, NRCS, MLRA Leader, Portland, OR
>
> Tim Sullivan, USFS, Asst. Regional Soil Scientist, Lakewood, CO

USDA:NRCS:Thahn

### MACRO TO FORMAT MAP UNIT DESCRIPTIONS

# Overview

A macro has been developed by MO6 to automatically format map unit
descriptions (MUDs) that have been generated from NASIS. The macro is
written for Word 97. It only works on files that have the Pagemaker
typesetting codes inserted. At this time, all the MO6 MUD reports can be
generated with these codes.

The objective of this macro is to enable soil survey project offices to
very quickly convert NASIS map unit descriptions to formatted documents
that are easy to read and have a professional appearance. The formatted
document is nearly identical in appearance to a type-set standard soil
survey, and is suitable for distribution to customers.

A brief summary of how this macro is used:

1.  Generate a map unit description in NASIS, using a report with codes
    inserted

2.  Transfer the MUD text file to the home computer, and load into Word

3.  Run the macro to format the MUD

# Installing the Macro

To use this macro it must be added to your normal template in Word 97.
The macro is posted on the MO6 HP server as a Word template file named
'MO6macros.dot'. This template file is only used as a "vehicle" to
transfer the macro (and other macros written by MO6) to the users'
normal template. There is no other use for the MO6macros.dot template in
the MUD formatting process.

[Steps to Install the Macro:]{.underline}

1.  Ftp the file ''MO6macros.dot' from the /home2/outgoing/ directory on
    the Lakewood HP computer (coshp01.co.nrcs.usda.gov) to your home
    computer. Place this file in the directory that holds your normal
    Word template file ( normal.dot ). For NRCS CCE computers, this is
    commonly the directory 'C:\\Program Files\\Microsoft
    Office\\Templates\\'.

2.  Open Word, click 'File' menu, then click 'New', click on the
    'General' tab, and choose MO6macros.dot, then click OK.

3.  Next, with a blank document on the screen, click the 'Tools' menu,
    then 'Macro', then 'Macros'. In the Macros box, click 'Organizer'.
    In the 'Organizer' box, click the 'Macro Project Items' tab. On the
    left side, under the heading 'Macro Project Items available in:'
    choose 'MO6macros.dot (Template)' from the choice list.

4.  In the large box on the left side, highlight the macro
    'MUDformat_0300' Then click the 'Copy' button to copy this macro to
    the 'Normal.dot' side. Close the 'Organizer' box.

You have now copied the macro named 'MUDformat_0300' from the
MO6macros.dot template to your normal.dot template. If prompted when you
exit, save changes to the 'normal.dot' . The macro will then be saved
and available whenever a text file document is opened.

The suffix '\_0300' of the macro name indicates the revision date, which
at this time is March '00. It is expected that this macro will need to
be updated periodically.

# Running the Macro

1.  Load the map unit description document you want to format. (For
    example, the text file output from the NASIS map unit description
    report.)

2.  Click 'Tools' menu, then 'Macro', then 'Macros'. In the 'Macros'
    box, choose the macro 'MUDformat_0300', then click 'Run". If this
    macro does not appear under 'Macros in: Normal.dot' then it was not
    correctly copied over in steps 3 and 4 above.

3.  The macro will automatically apply formatting to the document. A
    message box is displayed when the macro is finished.

This macro will work on one MUD or on an entire legend. It was tested on
a legend of 285 map units and it took about 15 minutes to run. No memory
problems were encountered.

# 

# 

#  Important Considerations When Using the Macro

This macro performs 3 main operations:

1.  Applies character, paragraph, and document formatting by keying on
    the Pagemaker codes;

2.  Corrects improper wording that is inherent in the current NASIS MUD
    reports (such as the phrase 'Water and similar soils');

3.  Corrects [most]{.underline} of the map unit name to the proper
    upper/lower case.

## Formatting

The macro will correctly apply formatting to any line that contains a
Pagemaker code. Only those codes that are currently in use in MO6 MUDs
are included in the macro. These codes are not visible in the printed
document but are retained as hidden text. (To see the codes on the
screen, click Tools -- Options -- View - Hidden text)

## Wording

Be aware that the macro may not perform all the needed edits for proper
wording. Because of the variety of possible situations, [there will
always be a need to make some revisions after running the
macro]{.underline}. For example, MUG reports create a heading by adding
the word 'Soils' following the component name. When the component is a
miscellaneous land type, this creates an incorrect heading ("Rock
outcrop Soils"). This is corrected by the macro, but only for these
commonly used miscellaneous land types: Badland; Gullied land;
Miscellaneous water; Pits, gravel; Pits, mine; Riverwash; Rock outcrop;
Rubble land; Urban land; and Water. If other miscellaneous land types
are used, the author must correct those individually.

The macro does not delete the unnecessary soil properties for
miscellaneous land types, such as available water capacity for Rock
outcrop. The author must manually delete these lines as appropriate.

## Map unit name case

It is strongly recommended that map unit names, component names, and
phase names be entered in NASIS [with the proper case]{.underline}. This
will eliminate the need to edit the map unit name in many NASIS reports.
However, if map unit names are in NASIS as all upper case, the macro
automatically changes [most]{.underline} of the name to the proper lower
case. Except for surface texture and slope phases, [it does not change
phase names to lower case]{.underline}. These must be corrected
individually (for example, Alpha, Cool to Alpha, cool).