WD6X: WordBasic Examples: Outline and Outline()

Last reviewed: February 3, 1998
Article ID: Q122198
The information in this article applies to:
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1

SUMMARY

This 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 INFORMATION

Microsoft 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 INFORMATION

Syntax:

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 Sub

The 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:
Keywords : kbmacroexample macword word6 kbcode kbmacro kbprg
Version : MACINTOSH:6.0,6.0.1,6.0.1a
Platform : MACINTOSH
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.