Microsoft KB Archive/122198

{|
 * width="100%"|

WD6X: WordBasic Examples: Outline and Outline

 * }

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 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 professionals 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 a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please see the following page on the World Wide Web:

"http://www.microsoft.com/partner/referral/" For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

"http://support.microsoft.com/directory/overview.asp" 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 : kbmacro kbprg kbdtacode kbmacroexample macword word6

Issue type : kbhowto

Technology : kbWordSearch kbWordMSearch