![]() |
# 6614 - Filename/Path in a Document |
The information in this document applies to:
WordPerfect® 5.1 for DOS
Problem
This information describes how to create a macro that lets you display your document filename and path in a header on every page of your document. |
Answer:
Write a macro to create a header using the {SYSTEM}path~ and {SYSTEM}name~ commands. 1. Press Home, then Ctrl+F10 to start the macro editor. 2. Type a name for your macro at the Define Macro prompt, then press Enter. Type a Description for the macro, then press Enter. You are now in the macro editor, and need to create the header. 3. Press End to position the cursor after the {DISPLAY OFF} code. 4. Press Format (Shift+F8) to insert a {Format} code in the macro. 5. Type the following numbers without spaces between them: 2 3 1 2. The numbers you entered above simulate the following keystrokes in the Format menu: Page (2), Headers (3), Header A (1), Every Page (2). 6. Press Ctrl+PageUp to list the macro commands, then scroll down the list until {SYSTEM}is highlighted. 7. Press Enter, then type path~. 8. Press Ctrl+PageUp to list the macro commands. {SYSTEM} should still be highlighted. 9. Press Enter, then type name~. 10. Press Ctrl+V, then Exit (F7) to insert an {Exit} command. 11. Press Ctrl+V, then Exit (F7) to insert another {Exit} command. Your finished macro should look like this: {DISP OFF}{Format}2312 {SYSTEM}path~{SYSTEM}name~{Exit} {Exit} 12. Press Exit (F7) once to return to the document editing screen. To run the macro you have created: 1. Press Macro (Alt+F10). 2. Type the name of your macro and press Enter. To view the header you have created: 1. Press Print (Shift+F7), then choose View Document (6). |
Details:
Macros let you record keystrokes and play them back later. Headers let you add text or graphics to every page of a document. Although the {SYSTEM}variable~ macro command is not available from the menus of WordPerfect 5.1, you can include the command in a macro to display the path and filename of the current document. When placed in a header, the {SYSTEM}variable~ macro command lets you display the path and filename of the current document on every page of the document. See Also Macros, Macro Editor in the WordPerfect 5.1 for DOS reference manual Headers and Footers in the WordPerfect 5.1 for DOS reference manual |
Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER. |