WD: How to Simulate WordPerfect's Flush Right Command in Word

Last reviewed: February 3, 1998
Article ID: Q126926
The information in this article applies to:
  • Microsoft Word for the Macintosh, version 6.0, 6.0.1, 6.0.1a
  • Microsoft Word 98 Macintosh Edition
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word 97 for Windows

SUMMARY

This article describes how to create the effect called "Flush Right" in WordPerfect. In WordPerfect, the Flush Right command lines up some text in one line with the left margin, and the rest of the text with the right margin. The following is an example of this type of formatting:

   Chapter 4                                           Page 72
   text text text text text text text text text text text text
   text text text text text text text text text text text text
   text text text text text text text text text text text text

In Word, you can use a right-aligned tab or a two-column table to accomplish this effect. A two-column table is the fastest way to align text in this fashion.

You can set the right-aligned tab manually, or you can create a macro to set the tab automatically. If you use this type of formatting only occasionally, or if you are interested in learning more about setting tabs, read the "Method 2: Set the right-aligned tab manually" section of this article. If you use this type of formatting frequently, read the section titled "Method 3: Create a macro to set the tabs automatically."

MORE INFORMATION

To simulate the effect of the Flush Right command, use any of the following methods.

Method 1: Create a Two-Column Table

  1. Place the insertion point on the blank line where you want the text to appear.

  2. On the Table menu, click Insert Table. In the Number of Columns box, type "2" (without the quotation marks). In the Number of Rows box, type "1" (without the quotation marks). Click OK.

    The table appears in the document. If you do not see the table, click Gridlines on the Table menu.

  3. In the first column, type the text that you want to appear along the left margin.

  4. Click the right column. On the Format menu, click Paragraph. On the Indents and Spacing Tab select Right on the Alignment drop down list.

  5. Type the text you want to appear along the right edge of the page.

Method 2: Set a Right-Aligned Tab Manually

  1. Click the Show/Hide button on the Standard toolbar so that paragraph marks and spaces are visible.

    This makes it easier to see the tab mark when you insert it in step 4.

  2. Click the View menu and make sure that Ruler is selected.

  3. Type the text you want to appear along the left margin.

  4. Press the TAB key.

    A small arrow (tab indicator) appears next to the text.

  5. Move the mouse to the left edge of the ruler. A small black "L" symbol is in a small box. Click the box. Each time you click it, a different symbol appears. Each symbol represents a different type of tab. Click the box until a small backwards "L" appears.

  6. Move the mouse to the place on the ruler where you want the right edge of the text to appear. (Hint: it may be easiest to see this if you do not click all the way at the right edge of the ruler. Start a little way in from the right edge. You can easily drag the tab setting later.) Click the mouse.

    A small backwards "L" appears on the ruler.

  7. Type the text that you want to appear at the right edge.

The text is now aligned along the left and right margins.

When you press ENTER to start a new paragraph, the new paragraph will have the same tab setting.

NOTE: On Windows only, if you do not see the same tab setting when you press ENTER, you have the WordPerfect options turned on. To disable these options, click Options on the Tools menu, select the General tab, and clear the Help for WordPerfect Users and the Navigation Keys for WordPerfect Users check boxes.

Method 3: Create a Macro to Set the Right-Aligned Tab Automatically (Word 6.x and 7.0 only)

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/

The following a macro automates the steps described in method 2 by creating a right-aligned tab stop at the right paragraph indent and inserting a tab character at the insertion point.

You can assign the macro to a toolbar button, a quick key, or to a menu. For more information about how to do this, see the "Customizing Menus," "Customizing Shortcut Keys," or "Customizing Toolbars" topic in online Help.

Before you run this macro, place the insertion point on a line of text that ends with a paragraph mark or new line character. The macro causes the insertion point and any text to the right of it to be right aligned.

  1. On the Tools menu, click Macro.

  2. In the Macros Available In field, select All Active Templates or the name of a specific template.

  3. In the Name field, type "FlushRight" (without the quotation marks), and click Create.

d. Type the following macro (capitalization is not important):

      Sub MAIN
         On Error Goto Bye
         Dim Page As FilePageSetup
         GetCurValues Page
         RightMarg = Val(Page.PageWidth) - (Val(Page.LeftMargin)
            +Val(Page.RightMargin))
         Dim Para As FormatParagraph
         GetCurValues Para
         RTabPos$ = Str$(RightMarg - Val(Para.RightIndent))
         FormatTabs .Position = RTabPos$, .Align = 2, .Set
         Insert Chr$(9)
         Bye:
      End Sub

   Note that the line beginning with "RightMarg =" wraps to a
   second line in this article, but you should not wrap it to
   a second line when you type it in Word, (that is, type
   lines 5 and 6 on one line).

e. On the File menu, click Close, and save the changes to the
   macro.

This macro does not remove or change existing custom tab stops in the paragraph. Consequently, if there are existing custom tab settings in the paragraph, the tab character inserted by the macro may only move the insertion point to the next custom tab stop and not to the right indent. Press the TAB key until the insertion point is aligned at the right edge of the paragraph, or clear the existing custom tab stops before running the macro.

When you press ENTER to start a new paragraph, the new paragraph will have the same tab setting as the paragraph above it. (If you do not see the same tab setting when you press ENTER, you have the WordPerfect options turned on. To disable these, click Options on the Tools menu, click the General tab, and clear the Help for WordPerfect Users and the Navigation Keys for WordPerfect Users check boxes.)

The third-party products mentioned here are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.


Additional query words: word perfect wp justify justified justification
flush right same lineup ALT+F6 ALT+F7 edge
Keywords : kblayout macword textconv winword word6 word7 word8 word95 word97 kb3rdparty kbcode kbmacro kbualink97
Version : MACINTOSH:6.0,6.0.1,6.0.1a,98;WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97
Platform : MACINTOSH WINDOWS
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.