FormatBordersAndShading

Syntax

FormatBordersAndShading [.ApplyTo = number] [, .Shadow = number] [, .TopBorder = number] [, .LeftBorder = number] [, .BottomBorder = number] [, .RightBorder number] [, .HorizBorder = number] [, .VertBorder = number] [, .TopColor = number] [, .LeftColor = number] [, .BottomColor = number] [, .RightColor = number] [, .HorizColor = number] [, .VertColor = number] [, .FineShading = number] [, .FromText = number or text] [, .Shading = number] [, .Foreground = number] [, .Background = number] [, .Tab = number]

Remarks

Sets border and shading formats for the selected paragraphs, table cells, or graphic. The arguments for the FormatBordersAndShading statement correspond to the options in the Borders And Shading dialog box (Format menu).

Argument

Explanation

.ApplyTo

If the selection consists of more than one of the following items, specifies to which item or items the border format is applied:

0 (zero) Paragraphs

1 Graphic

2 Cells

3 Whole table

If .ApplyTo is omitted, the default for the selection is assumed.

.Shadow

Specifies whether to apply a shadow to the border of paragraphs or a graphic:

0 (zero) Does not apply a shadow.

1 Applies a shadow.

You cannot apply a shadow to a table or table cells. If you want to apply a shadow to a paragraph or graphic, the item must have — or you must specify — matching right, left, top, and bottom borders. Otherwise, an error occurs.

.VertBorder

The line style for the vertical border between table cells, in the range 0 (zero), which is no border, through 11 (or 12 on the Macintosh). The border does not appear unless the table selection is at least two cells wide. (When applied to paragraphs, .VertBorder has the same effect as .LeftBorder.)

.TopColor, .LeftColor, .BottomColor, .RightColor, .HorizColor, .VertColor

The color to be applied to the specified borders, in the range from 0 (zero), which is Auto, through 16. For a list of colors and their values, see CharColor.

.FineShading

A shading pattern in the range 0 (zero) to 40 corresponding to a shading percentage in 2.5 percent increments. If .FineShading is anything but 0 (zero), .Shading is ignored.

.FromText

The distance of the border from adjacent text, in points or a text measurement. Valid only for paragraphs; otherwise, .FromText must be an empty string ("") or omitted or an error will occur.

.Shading

The shading pattern to be applied to the selection, in the range from 0 (zero), which is Clear, through 25. For a list of shading patterns and their values, see ShadingPattern.


Argument

Explanation

.Foreground

The color to be applied to the foreground of the shading, in the range from 0 (zero), which is Auto, through 16. For a list of colors and their values, see CharColor.

.Background

The color to be applied to the background of the shading, in the range from 0 (zero), which is Auto, through 16.

.Tab

Specifies which tab to select when you display the Borders And Shading dialog box with a Dialog or Dialog() instruction:

0 (zero) Borders tab

1 Shading tab


See Also

BorderBottom, BorderInside, BorderLeft, BorderLineStyle, BorderNone, BorderOutside, BorderRight, BorderTop, EditFindBorder, EditReplaceBorder, ShadingPattern