Microsoft KB Archive/123725

{|
 * width="100%"|

WD: WordBasic Examples: Shadow and Shadow

 * }

Q123725

-

The information in this article applies to:


 * Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a

-

SUMMARY
This article contains an example that demonstrates the use of the following WordBasic statement and function:

  Shadow Shadow This supplements the information in Word Help.

To view this Help topic, choose the Help button on your keyboard, click the Programming with Microsoft Word option, and choose the Search button. Type shadow on the query line. Choose the Shadow statement and function option from the list and click the Show Topics button. Choose Shadow, Shadow in the topic list, and click the Go To button.

WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Shadow/Shadow
Syntax

Shadow [On]

Shadow The On argument tells the Shadow statement to add or remove the shadow format. The On argument can have the following values:

  1         Will apply the shadow format to the current selection. 0(zero)  Removes the shadow format from the current selection. Omitted  Toggles the shadow format. The Shadow statement adds or removes the shadow character format for the current selection. It can also be used to control the shadow format for characters to be inserted at the insertion point.

The Shadow function will check the format of the current selection and return the following values:

  0(zero)   If none of the selected text has the Shadow format. -1        If part of the selected text has the Shadow format. 1        If all of the selected text has the Shadow format. NOTE: The Shadow and Shadow commands are not available on the Windows platform and will generate WordBasic errors.

Example
The following macro will use the Shadow command to turn on the shadow character format for the whole document.

  Sub MAIN: EditSelectAll Shadow 1 End Sub The following macro will check to see if any of the currently selected text has the shadow format. If none of the selected text has the shadow format, the macro will apply the Shadow format to the selection.

  Sub MAIN: If (Shadow = 0) Then Shadow End If  End Sub Additional query words: macro example

Keywords : kbmacro kbmacroexample macword word6

Issue type : kbhowto

Technology :