WD6X: WordBasic Examples: Outline and Outline()Last reviewed: February 3, 1998Article ID: Q122198 |
The information in this article applies to:
SUMMARYThis article contains sample macros that demonstrate use of the following WordBasic statement and function:
Outline Outline()This article supplements the information available in Help. To open this Help topic, press the Help button on your keyboard, click the Programming With Microsoft Word option, and type "outline" (without the quotation marks) on the query line. Click the Outline statement and function option from the list.
MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/supportnet/refguide/ MORE INFORMATIONSyntax: Outline [On] Outline() The On argument tells the Outline statement to add or remove the outline format. The On argument can have the following values:
Value Result ------------------------------------------------------------------- 1 Applies the outline format to the current selection. 0 (zero) Removes the outline format from the current selection. Omitted Toggles the outline format.The Outline statement adds or removes the outline character format for the current selection. It also controls the outline format for characters to be inserted at the insertion point. The Outline() function checks the format of the current selection and returns the following values:
Value Format ----------------------------------------------------------------- 0 (zero) If none of the selected text has the Outline format. -1 If part of the selected text has the Outline format. 1 If all of the selected text has the Outline format.NOTE: In Word for Windows, the Outline and Outline() commands are not available and generate errors if used. Examples: The following sample macro uses the Outline command to turn on the outline character format for the whole document.
Sub MAIN EditSelectAll Outline 1 End SubThe following sample macro checks to see if any of the currently selected text has the outline format. If none of the selected text has the outline format, the macro applies the Outline format to the selection.
Sub MAIN If (Outline() - 0) Then Outline End Sub |
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |