WD: WordBasic Examples: Shadow and Shadow()Last reviewed: February 5, 1998Article ID: Q123725 |
The information in this article applies to:
SUMMARYThis 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()
SyntaxShadow [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.
ExampleThe following macro will use the Shadow command to turn on the shadow character format for the whole document.
Sub MAIN: EditSelectAll Shadow 1 End SubThe 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |