WD: How to Simulate WordPerfect's Flush Right Command in WordLast reviewed: February 3, 1998Article ID: Q126926 |
The information in this article applies to:
SUMMARYThis 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 textIn 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 INFORMATIONTo simulate the effect of the Flush Right command, use any of the following methods.
Method 1: Create a Two-Column Table
Method 2: Set a Right-Aligned Tab Manually
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.
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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |